Skip to content

Instantly share code, notes, and snippets.

@sapardi
Created February 28, 2012 03:38
Show Gist options
  • Save sapardi/1929213 to your computer and use it in GitHub Desktop.
Save sapardi/1929213 to your computer and use it in GitHub Desktop.
Hello World Node.js
var http = require('http');
var server = http.createServer(function(request, response) {
console.log('new request');
response.writeHead(200, {
'Content-Type': 'text/plain'
});
response.end('Hello World');
});
server.listen(4000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment