diff --git a/index.js b/index.js index f085ee2ad..7e2d3f3fd 100644 --- a/index.js +++ b/index.js @@ -1,13 +1,11 @@ -var http = require('http'); - -var server = http.createServer(function(request, response) { +const http = require('http'); +const server = http.createServer((request, response) => { response.writeHead(200, {"Content-Type": "text/plain"}); response.end("Hello World!"); - }); -var port = process.env.PORT || 1337; +const port = process.env.PORT || 1337; server.listen(port); console.log("Server running at http://localhost:%d", port);