Skip to content

Instantly share code, notes, and snippets.

@papachan
Created October 11, 2011 17:51
Show Gist options
  • Save papachan/1278837 to your computer and use it in GitHub Desktop.
Save papachan/1278837 to your computer and use it in GitHub Desktop.
helloworld.js
var http = require('http');
var server = http.createServer(function(req,res){
res.writeHead(200, {'Content-type': 'text/plain'})
res.end("hello world\n");
});
server.listen(3000);
console.log('the server is running port 3000');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment