- Add PublicCampaignsController for public campaign analytics
- Add public routes for /public/analytics/{slug} and /api/campaigns/{slug}
- Add public campaign analytics view with charts and KPIs
- Support for campaign sharing via custom slugs
- Real-time analytics with ApexCharts integration
42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
module.exports = {
|
|
apps: [{
|
|
name: 'moneyflix-redirector',
|
|
script: 'index.mjs',
|
|
instances: 1,
|
|
exec_mode: 'cluster',
|
|
version: '2.0.1',
|
|
env_file: '.env',
|
|
env: {
|
|
NODE_ENV: 'production',
|
|
PORT: 3001,
|
|
DB_HOST: '127.0.0.1',
|
|
DB_PORT: 3306,
|
|
DB_USER: 'nodejs',
|
|
DB_PASSWORD: 'nodejs123',
|
|
DB_DATABASE: 'redirects_moneyflix',
|
|
CRM_API_URL: 'https://redirect.moneyflix.com/api/redirects',
|
|
CRM_API_KEY: 'moneyflix-api-key-2024',
|
|
TZ: 'Europe/Lisbon'
|
|
},
|
|
// PM2 Configuration
|
|
max_memory_restart: '500M',
|
|
min_uptime: '10s',
|
|
max_restarts: 5,
|
|
restart_delay: 4000,
|
|
|
|
// Logging
|
|
log_file: './logs/combined.log',
|
|
out_file: './logs/out.log',
|
|
error_file: './logs/error.log',
|
|
log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
|
|
|
|
// Monitoring
|
|
watch: false,
|
|
ignore_watch: ['node_modules', 'logs'],
|
|
|
|
// Advanced PM2 features
|
|
kill_timeout: 5000,
|
|
listen_timeout: 3000,
|
|
shutdown_with_message: true
|
|
}]
|
|
}; |