summaryrefslogtreecommitdiffhomepage
path: root/test/node/mirror/app.js
blob: abcb87cbd715a9de112f23c4895f7684a1f76384 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/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);