Files
nginx-unit/test/node/mirror/app.js
2018-10-25 15:43:48 +03:00

13 lines
315 B
JavaScript
Executable File

#!/usr/bin/env node
require('unit-http').createServer(function (req, res) {
let body = '';
req.on('data', chunk => {
body += chunk.toString();
});
req.on('end', () => {
res.writeHead(200, {'Content-Length': Buffer.byteLength(body)});
res.end(body);
});
}).listen(7080);