mirror of
https://github.com/avwo/whistle.git
synced 2026-10-22 01:06:41 +08:00
10 lines
238 B
JavaScript
10 lines
238 B
JavaScript
module.exports = function(server) {
|
|
server.on('request', function(req, res) {
|
|
let body;
|
|
req.on('data', (data) => {
|
|
body = body ? Buffer.concat([body, data]) : data;
|
|
});
|
|
req.on('end', () => res.end(body));
|
|
});
|
|
};
|