pm2 run npm run build code example
Example 1: pm2 to start npm run dev
pm2 start "npm run dev" --name myAppName
Example 2: pm2 --run
pm2 start npm --name AppName -- run start-npm-dev
pm2 start "npm run dev" --name myAppName
pm2 start npm --name AppName -- run start-npm-dev