Skip to content

Instantly share code, notes, and snippets.

@alanb1501
Created March 4, 2015 21:51
Show Gist options
  • Save alanb1501/361b0fa0effc2cb14b61 to your computer and use it in GitHub Desktop.
Save alanb1501/361b0fa0effc2cb14b61 to your computer and use it in GitHub Desktop.
very simple node.js http server
var http = require('http');
http.createServer(function (req,res ){
console.log(req);
res.writeHead(200,{'content-type':'text/html'});
res.end('<html><body><h1>HELLO WORLD</h1></body></html>');
}).listen(7777,'localhost');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment