I run the nodejs app with yarn run start , what is the command for pm2 I should use?
pm2 yarn run start give me an error.
My package.json content 
"scripts": {
    "start": "budo main.js:dist/bundle.js --live --host 0.0.0.0",
    "watch": "watchify main.js -v --debug -o dist/bundle.js",
    "prep": "yarn && mkdirp dist",
    "build": "browserify main.js -o dist/bundle.js",
    "lint": "eslint main.js --fix",
    "deploy": "yarn build && uglifyjs dist/bundle.js -c -m -o dist/bundle.min.js"
  },
For me (on ubuntu 20)
pm2 start yarn --name api -- start
would do the trick. With the bash interpreter flag it would error in pm2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With