How to stop app that node.js express 'npm start'

后端 未结 16 2020
名媛妹妹
名媛妹妹 2020-12-07 11:00

You build node.js app with express v4.x then start your app by npm start. My question is how to stop the app? Is there npm stop?

16条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 11:17

    You can use pm2

    https://pm2.keymetrics.io/docs/usage/quick-start/

    after installation just type in terminal

    pm2 start app.js and then

    pm2 stop 0 to stop your server

提交回复
热议问题