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"
},
start
, then you only have to replace the finalstart
by your new script name. (i.e:pm2 start yarn --interpreter bash --name api -- start:prod
if I useyarn run start:prod
). – Moniz