Pm2: run npm run start from ecosystem config pm2

Created on 14 Nov 2017  路  2Comments  路  Source: Unitech/pm2

How would one run the following
run npm run start from ecosystem config pm2
for all my apps inside the ecosystem file

folder structure
/root
/servers
/server1
/server 2
ecosystemfile

 name: 'xxxx',
      script: 'npm start iotservers/xx/app.js',
      watch: true,
      env: {
        NODE_ENV: 'production',
        PORT: 1331
      },
      env_production: {
        NODE_ENV: 'production',
        PORT: 1331
      }
    },

All 2 comments

exited with code [0]   x
x                                 xx via signal [SIGINT]                                                           x
x                                 xx PM2 > Script /usr/bin/npm had too many unstable restarts (16). Stopped.       x
x                                 xx "errored"   
Was this page helpful?
0 / 5 - 0 ratings