Skip to content

Instantly share code, notes, and snippets.

@hsleewis
Last active August 29, 2015 14:01
Show Gist options
  • Save hsleewis/2a54585ab32a71dafd6e to your computer and use it in GitHub Desktop.
Save hsleewis/2a54585ab32a71dafd6e to your computer and use it in GitHub Desktop.
http.createServer(function (req, res) {
var jsondata = "";
req.on('data', function (chunk) {
jsondata += chunk;
});
req.on('end', function () {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end();
console.log( jsondata );
// do something with the JSON data
});
}).listen(3333);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment