How should I use pm2 command for npm run dev
Try this: sudo pm2 start npm -- dev
The following works for me.
pm2 start "npm run dev" --name myAppName
Your app name will be myAppName
You can see the logs
pm2 logs "myAppName"
Try this: sudo pm2 start npm -- dev
The following works for me.
pm2 start "npm run dev" --name myAppName
Your app name will be myAppName
You can see the logs
pm2 logs "myAppName"