module.exports = { apps: [ { name: 'api-prod', cwd: './server', script: 'npx', args: 'tsx src/index.ts', env: { NODE_ENV: 'production', PORT: 3002, DATABASE_URL: 'file:./data.db', SESSION_SECRET: 'K7xP2mN9qR4sT6vW8yB1cD3fG5hJ0kL2nO4pQ6rS8tU0wX2z', BACKEND_SECRET: 'A1bC3dE5fG7hI9jK1lM3nO5pQ7rS9tU1vW3xY5zA7bC9dE1f', CORS_ORIGINS: 'https://leagues.tools,https://www.leagues.tools,http://localhost:3002', FRONTEND_BUILD_PATH: '../os-league-tools-master/build', APP_URL: 'https://leagues.tools', // SMTP Configuration - fill in your server details SMTP_HOST: 'yeahnah-net.mail.protection.outlook.com', // e.g., 'smtp.gmail.com' or 'mail.yourserver.com' SMTP_PORT: '25', // 587 for TLS, 465 for SSL SMTP_SECURE: 'false', // 'true' for port 465, 'false' for 587 SMTP_USER: 'bailey@yeahnah.net', // SMTP username/email SMTP_PASS: 'Howaboutno123!', // SMTP password or app password SMTP_FROM: 'noreply@leagues.tools', // From address for emails }, }, { name: 'api-dev', cwd: './server', script: 'npx', args: 'tsx watch src/index.ts', env: { NODE_ENV: 'development', PORT: 3003, DATABASE_URL: 'file:./data-dev.db', SESSION_SECRET: 'K7xP2mN9qR4sT6vW8yB1cD3fG5hJ0kL2nO4pQ6rS8tU0wX2z', BACKEND_SECRET: 'A1bC3dE5fG7hI9jK1lM3nO5pQ7rS9tU1vW3xY5zA7bC9dE1f', CORS_ORIGINS: 'http://localhost:3000,http://localhost:3001,https://dev.leagues.tools', FRONTEND_BUILD_PATH: '../os-league-tools-master/build', APP_URL: 'https://dev.leagues.tools', // SMTP Configuration - same as prod or leave empty for console logging SMTP_HOST: 'yeahnah-net.mail.protection.outlook.com', SMTP_PORT: '25', SMTP_SECURE: 'false', SMTP_USER: 'bailey@yeahnah.net', SMTP_PASS: 'Howaboutno123!', SMTP_FROM: 'noreply@leagues.tools', }, }, { name: 'frontend-dev', cwd: './os-league-tools-master', script: 'npm', args: 'run dev', env: { BROWSER: 'none', PORT: 3000, WDS_SOCKET_PORT: 443, // Use nginx's HTTPS port for WebSocket }, }, ], };