var http = require('http');
var port = 8888;
var server = http.createServer();
server.on('request', function(request, response) {
var data = '';
request.on('data', function(chunk) {
data += chunk.toString();
});
request.on('end', function() {
console.log(data);
response.end();
});
});
server.listen(port);