webconsole id in url

This commit is contained in:
Djeeberjr 2022-03-01 12:59:02 +01:00
parent 1a808055ea
commit 4903014ebd

View File

@ -13,6 +13,8 @@ const server = http.createServer((req, res) => {
return; return;
} }
var id = req.url.substring(1);
let data = ""; let data = "";
req.on('data', chunk => { req.on('data', chunk => {
@ -20,7 +22,7 @@ const server = http.createServer((req, res) => {
}) })
req.on('end', () => { req.on('end', () => {
console.log(`[${time()}]${data}`); console.log(`[${time()}][${id}]${data}`);
res.writeHead(200); res.writeHead(200);
res.end(); res.end();
}) })