pm2.dev.js

This commit is contained in:
Xu Chang 2024-08-29 12:22:58 +08:00
parent 12c4cfc967
commit a916e2c304
1 changed files with 3 additions and 15 deletions

View File

@ -3,28 +3,16 @@ module.exports = {
{ {
name: 'oak-template-server', name: 'oak-template-server',
script: './scripts/startServer.js', script: './scripts/startServer.js',
instances: '10', instances: '1',
exec_mode: 'cluster', exec_mode: 'cluster',
log_date_format: 'YYYY-MM-DD HH:mm:ss Z', log_date_format: 'YYYY-MM-DD HH:mm:ss Z',
increment_var: "OAK_INSTANCE_ID", increment_var: "OAK_INSTANCE_ID",
env: { env: {
OAK_PLATFORM: 'server', OAK_PLATFORM: 'server',
NODE_ENV: 'development', NODE_ENV: 'development',
OAK_INSTANCE_CNT: 10, OAK_INSTANCE_CNT: 1,
OAK_INSTANCE_ID: 0, OAK_INSTANCE_ID: 0,
}, }
env_prod: {
OAK_PLATFORM: 'server',
NODE_ENV: 'production',
OAK_INSTANCE_CNT: 10,
OAK_INSTANCE_ID: 0,
},
env_staging: {
OAK_PLATFORM: 'server',
NODE_ENV: 'staging',
OAK_INSTANCE_CNT: 10,
OAK_INSTANCE_ID: 0,
},
}, },
], ],
}; };