use dirname

This commit is contained in:
saiminh 2026-01-08 18:21:20 +13:00
parent 22d502b090
commit ed2f5a449c

View file

@ -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,