npm install pm2 -g

 

[ecosystem.config.js]

module.exports = {
  apps: [
    {
      name: 'app-name',
      script: './node_modules/nuxt/bin/nuxt.mjs',
      args: 'dev --dotenv config/.env.dev --port 3003'
    }
  ]
}

 

>pm2 start

>pm2 ps

 

[jenkins script after build]

call pm2 stop app-name

call npm install

call xcopy "src" "target" /e /k /y

call pm2 restart app-name

+ Recent posts