-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathecosystem.config.js
41 lines (41 loc) · 984 Bytes
/
ecosystem.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
module.exports = {
apps: [
{
name: 'prod',
script: 'dist/server.js',
exec_mode: 'cluster',
instance_var: 'INSTANCE_ID',
instances: 2,
autorestart: true,
watch: false,
ignore_watch: ['node_modules', 'logs'],
max_memory_restart: '1G',
merge_logs: true,
output: './logs/access.log',
error: './logs/error.log',
env: {
PORT: 3000,
NODE_ENV: 'production',
},
},
{
name: 'dev',
script: 'ts-node',
args: '-r tsconfig-paths/register --transpile-only src/server.ts',
exec_mode: 'cluster',
instance_var: 'INSTANCE_ID',
instances: 2,
autorestart: true,
watch: false,
ignore_watch: ['node_modules', 'logs'],
max_memory_restart: '1G',
merge_logs: true,
output: './logs/access.log',
error: './logs/error.log',
env: {
PORT: 3000,
NODE_ENV: 'development',
},
},
]
};