Skip to content

Instantly share code, notes, and snippets.

@alanhoff
Created October 12, 2014 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanhoff/d48fe9b38fd528ea4c53 to your computer and use it in GitHub Desktop.
Save alanhoff/d48fe9b38fd528ea4c53 to your computer and use it in GitHub Desktop.
require('http').Server(function(req, res){
console.log('%s %s', req.method, req.url);
var data = '';
req.on('data', function(buff){
data += buff;
});
req.on('end', function(){
console.log(data);
console.log('---------------------------');
res.end();
});
}).listen(8888);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment