Skip to content

Instantly share code, notes, and snippets.

@ericychoi
Created February 20, 2015 01:10
Show Gist options
  • Save ericychoi/45b5dafa805434d532fe to your computer and use it in GitHub Desktop.
Save ericychoi/45b5dafa805434d532fe to your computer and use it in GitHub Desktop.
Simple HTTP POST Sink
var http = require('http');
http.createServer(function(request,response){
var body = "";
request.on('data', function(chunk) { body += chunk; });
request.on('end', function() {
console.log('POST: ' + body + "\n");
response.writeHead(200);
response.end();
});
}).listen(8000);
console.log("server started\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment