diff --git a/README.md b/README.md index 0e58d39..5f32a4d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,21 @@ ## Use case cd to main project directory
-run: node index.js // output: [listening on *:3000] \ No newline at end of file +run: node index.js // output: [listening on *:3000] + +### use pm2 + +#### install +sudo npm install pm2@latest -g + +#### start +pm2 start index.js + +#### monitor +pm2 monit + +#### document +[pm2 quick start](https://pm2.keymetrics.io/docs/usage/quick-start/) + + + diff --git a/index.js b/index.js index 60746a8..6c77464 100644 --- a/index.js +++ b/index.js @@ -52,7 +52,7 @@ io.on('connection', async (socket) => { // }); app.post('/emit/:room', function (req, res) { - console.log(req.body); + // console.log(req.body); io.to('room-' + req.params.room).emit('room-event', req.body.data.title); res.send('done'); });