Skip to content

Commit

Permalink
Merge pull request #15 from hyuko21/patch-1
Browse files Browse the repository at this point in the history
updated to modern js (ES6+)
  • Loading branch information
msangapu-msft authored Mar 11, 2019
2 parents a8a2a9d + 30d9fd2 commit d639e08
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit d639e08

Please sign in to comment.