How to specify a port number for pm2

前端 未结 3 1083
执笔经年
执笔经年 2021-02-01 16:37

I\'m trying to use pm2 to manage a node.js cluster

pm2 start . -i 3

I\'m currently running the app on heroku and using a Procfile with the abov

3条回答
  •  一向
    一向 (楼主)
    2021-02-01 17:02

    You need to use -- to tell pm2 to stop parsing his options and give the rest to the program, then when you spawn direct binary, you need to tell pm2 that you don't want to use nodejs, so :

    pm2 start rethinkdb --interpreter none -- --port 8082

    You see you need -- --port 8082

提交回复
热议问题