How to pass arguments to app using pm2?

后端 未结 10 1160
予麋鹿
予麋鹿 2020-12-07 17:29

I am using pm2 to start my app but i am not able to pass argument to it. the command I am using is pm2 start app.js -- dev. Though this works with forever.

10条回答
  •  失恋的感觉
    2020-12-07 17:47

    You can send arguments to your script by passing them after --. For example: pm2 start app.js -i max -- -a 23 // Pass arguments after -- to app.js

提交回复
热议问题