Instal PM2
npm install pm2 -g
Elated Eland
npm install pm2 -g
pm2 start "npm run dev" --name myAppName
$ npm install pm2@latest -g
# or
$ yarn global add pm2
pm2 start npm --name "app name" -- start
pm2 start npm --name "app name" -- start
pm2.start({
name: `App`,
script: `index.js`,
out_file: `app.strout.log`,
error_file: `app.strerr.log`
}, function (err, apps) {
if (err) {
console.log(err)
}
console.log("done")
})