module.exports = {
  apps: [
    {
      name: 'newwhats-backend',
      script: 'npm',
      args: 'run dev',
      cwd: '/home/deploy/projetos/newwhats.local/backend',
      watch: false,          // tsx watch já cuida do reload
      env: {
        NODE_ENV: 'development',
      },
      // Mostra logs coloridos no pm2 logs
      time: true,
    },
    {
      name: 'newwhats-frontend',
      script: 'npm',
      args: 'run dev',
      cwd: '/home/deploy/projetos/newwhats.local/frontend',
      watch: false,          // next dev tem Fast Refresh nativo
      env: {
        NODE_ENV: 'development',
      },
      time: true,
    },
  ],
}
