From ed2f5a449cae5c1f5a02666f94f6725781858b1c Mon Sep 17 00:00:00 2001 From: saiminh Date: Thu, 8 Jan 2026 18:21:20 +1300 Subject: [PATCH] use dirname --- ecosystem.config.cjs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ecosystem.config.cjs b/ecosystem.config.cjs index 09d83f8..bd34946 100644 --- a/ecosystem.config.cjs +++ b/ecosystem.config.cjs @@ -1,8 +1,10 @@ +const path = require('path'); + module.exports = { apps: [{ name: 'floter-design', - script: './build/index.js', - cwd: '/floter-design', + script: path.join(__dirname, 'build/index.js'), + cwd: __dirname, instances: 1, exec_mode: 'fork', env: { @@ -10,8 +12,8 @@ module.exports = { PORT: 3001, HOST: '0.0.0.0' }, - error_file: './logs/err.log', - out_file: './logs/out.log', + error_file: path.join(__dirname, 'logs/err.log'), + out_file: path.join(__dirname, 'logs/out.log'), log_date_format: 'YYYY-MM-DD HH:mm:ss Z', merge_logs: true, autorestart: true,