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.
Well there are 2 ways you can do to pass the parameters from pm2 to nodejs in CLI:
Both ways, you will find these values exist in process.argv (['dev','--port=1234'])
process.argv