Is there a way for pm2 to run an npm start script or do you just have to run pm2 start app.js
So in development
npm start
you need to provide app name here like myapp
pm2 start npm --name {appName} -- run {script name}
you can check it by
pm2 list
you can also add time
pm2 restart "id" --log-date-format 'DD-MM HH:mm:ss.SSS'
or pm2 restart "id" --time
you can check logs by
pm2 log "id"
or pm2 log "appName"
to get logs for all app
pm2 logs