DeveloperBreeze

Pm2 Reload All Development Tutorials, Guides & Insights

Unlock 1+ expert-curated pm2 reload all tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your pm2 reload all skills on DeveloperBreeze.

PM2 Cheatsheet

Cheatsheet October 14, 2024

pm2 deploy ecosystem.config.js production update
   module.exports = {
     apps: [
       {
         name: 'app-name',
         script: 'app.js',
         env: {
           NODE_ENV: 'development',
         },
         env_production: {
           NODE_ENV: 'production',
         }
       }
     ],
     deploy: {
       production: {
         user: 'username',
         host: 'your-server.com',
         ref: 'origin/master',
         repo: 'git@github.com:your-repo.git',
         path: '/var/www/your-app',
         'post-deploy': 'npm install && pm2 reload ecosystem.config.js --env production',
       }
     }
   };