mirror of
https://kevinblog.sytes.net/Code/Jibo-Revival-Group/Zos.git
synced 2026-06-16 14:16:30 +00:00
17 lines
318 B
JavaScript
17 lines
318 B
JavaScript
|
|
module.exports = function (req, res) {
|
||
|
|
var data = '';
|
||
|
|
|
||
|
|
req.on('data', function (chunk) {
|
||
|
|
data += chunk;
|
||
|
|
});
|
||
|
|
|
||
|
|
req.on('end', function () {
|
||
|
|
console.log('POST data received');
|
||
|
|
res.writeHead(200, {
|
||
|
|
'Content-Type': 'text/json'
|
||
|
|
});
|
||
|
|
res.write(JSON.stringify(data));
|
||
|
|
res.end();
|
||
|
|
});
|
||
|
|
};
|