Can pm2 run an 'npm start' script

前端 未结 17 1213
心在旅途
心在旅途 2020-12-04 04:45

Is there a way for pm2 to run an npm start script or do you just have to run pm2 start app.js

So in development

npm start

17条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 05:04

    See to enable clustering:

    pm2 start npm --name "AppName" -i 0 -- run start
    

    What do you think?

提交回复
热议问题