Last active
April 11, 2016 16:08
-
-
Save ismyrnow/0fb01673057383b4291c0a6419e04898 to your computer and use it in GitHub Desktop.
Hello world web server written for Node.JS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var port = process.env.PORT || 3000; | |
var server = http.createServer(function(req, res) { | |
res.end('Hello, world!'); | |
}); | |
server.listen(port, function () { | |
console.log('Hello world web server running on port %s', port); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment