1#!/usr/bin/env node 2 3require('unit-http').createServer(function (req, res) { 4 let body = ''; 5 req.on('data', chunk => { 6 body += chunk.toString(); 7 }); 8 req.on('end', () => { 9 res.writeHead(200, {'Content-Length': Buffer.byteLength(body)}) 10 .end(body); 11 }); 12}).listen(7080); 13