I’m wondering if pm2 can execute npm start commands directly or if I need to specify the main file like pm2 start server.js
During development I use:
npm start
For production with pm2, I want to do something like:
pm2 start 'npm start'
I know that forever has a similar feature:
forever start -c "npm start" ./
Is there an equivalent approach in pm2 to run npm scripts instead of pointing directly to the JavaScript file?