http.createServer(function (req, res) {
if (req.method == 'POST') {
req.on('data', function(chunk) {
console.log("Received body data:");
console.log(chunk.toString());
});
req.on('end', function() {
// empty 200 OK response for now
res.writeHead(200, "OK", {'Content-Type': 'text/html'});
res.end();
});
}
}).listen(1337);