-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecosystem.config.js
39 lines (38 loc) · 1.09 KB
/
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
/** @format */
// https://pm2.keymetrics.io/docs/usage/application-declaration/
module.exports = {
apps: [
{
name: 'API',
script: 'app.js',
// interpreter: './node_modules/.bin/ts-node',
// 解释器参数 -P 表示项目路径,会自动使用项目的 tsconfig.json
// interpreter_args: '-r tsconfig-paths/register',
instances: 1,
cwd: './',
autorestart: true,
ignore_watch: [
// 不用监听的文件
'node_modules',
'logs',
],
max_memory_restart: '1G',
env_pro: {
NODE_ENV: 'production',
REMOTE_ADDR: '',
watch: false,
},
env_dev: {
NODE_ENV: 'development',
REMOTE_ADDR: '',
watch: true,
},
env_test: {
NODE_ENV: 'test',
REMOTE_ADDR: '',
watch: false,
},
max_restarts: 10,
},
],
}