blob: 32d7d7b97c0bb7d90855677a04c30dcc841c2baa (
plain) (
tree)
|
|
var fs = require('fs');
require('http').createServer(function (req, res) {
res.end();
if (req.headers['x-write-call']) {
res.writeHead(200, {'Content-Type': 'text/plain'}).write('blah');
}
Promise.resolve().then(() => {
req.on('data', (data) => {
fs.appendFile(data.toString(), '', function() {});
});
});
}).listen(7080);
|