From 0c593d1019e55ef026941bc804b31fc328fa5e5b Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Mon, 16 Jan 2023 15:29:43 +0100 Subject: [PATCH] server message debug --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 636f831..9bdca88 100644 --- a/index.js +++ b/index.js @@ -10,7 +10,8 @@ app.use(express.static(clientPath)); const server = http.createServer(app); app.post('/message', (req, res) => { - const { user, message } = req.body; + const { id, message } = req.body; + console.log(`User '${id}' sent message '${message}'.`); res.status(200).json({message}); });