Skip to content

Instantly share code, notes, and snippets.

@nicksheffield
Created November 22, 2013 02:02
Show Gist options
  • Select an option

  • Save nicksheffield/7593556 to your computer and use it in GitHub Desktop.

Select an option

Save nicksheffield/7593556 to your computer and use it in GitHub Desktop.
Basic Node.js hello world example
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