summaryrefslogtreecommitdiffhomepage
path: root/test/node/mirror/app.js
blob: bdb894898fa75a4d16559920be7b2d762b019793 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11

require('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)})
           .end(body);
    });
}).listen(8080);