server message debug
This commit is contained in:
parent
01709c890d
commit
0c593d1019
3
index.js
3
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});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user