blob: 54df09d1348b8b2c2190b0601407f3027db7d74d (
plain) (
tree)
|
|
#!/usr/bin/env node
var fs = require('fs');
require('unit-http').createServer(function (req, res) {
res.end();
if (req.headers['X-Write-Call']) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.write('blah');
}
Promise.resolve().then(() => {
req.on('data', (data) => {
fs.appendFile(data.toString(), '', function() {});
});
});
}).listen(7080);
|