module.exports = { apps: [{ name: 'my-agent', // 应用名称 script: './dist/index.js', // 应用入口文件 autorestart: true, // 崩溃后自动重启[citation:2] max_memory_restart: '1G', // 内存超过1G自动重启[citation:2] env: { NODE_ENV: 'production', // 默认环境变量(开发) PORT: 7328 }, // 日志配置 error_file: './logs/err.log', // 错误日志路径 out_file: './logs/out.log', // 输出日志路径 log_date_format: 'YYYY-MM-DD HH:mm:ss' // 日志时间格式 }] };