Created
November 22, 2013 02:02
-
-
Save nicksheffield/7593556 to your computer and use it in GitHub Desktop.
Basic Node.js hello world example
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 server = http.createServer(function (request, response) { | |
| response.writeHead(200, {"Content-Type": "text/html"}); | |
| response.write('<h1>Hello World</h1>'); | |
| response.end(); | |
| console.log('Request: '+request.url); | |
| }); | |
| server.listen(80); | |
| console.log("Server running"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment