server message debug

This commit is contained in:
Baipyrus 2023-01-16 15:29:43 +01:00
parent 01709c890d
commit 0c593d1019

View File

@ -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});
});