From 4d1e218437446e59e1b09403f86925c00ead0e68 Mon Sep 17 00:00:00 2001 From: dzq Date: Fri, 12 Dec 2025 11:08:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=BA=94=E7=94=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=EF=BC=8C=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E5=92=8C=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecosystem.config.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 ecosystem.config.js diff --git a/ecosystem.config.js b/ecosystem.config.js new file mode 100644 index 0000000..e6b926f --- /dev/null +++ b/ecosystem.config.js @@ -0,0 +1,16 @@ +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' // 日志时间格式 + }] +}; \ No newline at end of file