-
Notifications
You must be signed in to change notification settings - Fork 4
/
ecosystem.config.js
50 lines (44 loc) · 983 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
42
43
44
45
46
47
48
49
50
function createApp(config) {
const logFile = `${__dirname}/logs/${config.name}.log`
return {
instances: 1,
autorestart: false,
log_date_format: 'HH:mm:ss',
vizion: false,
error_file: logFile,
out_file: logFile,
...config,
}
}
module.exports = {
apps: [
createApp({
name: 'build-api',
cwd: 'api',
script: 'npm run watch',
watch: ['./tsconfig.json', '../tsconfig.json'],
}),
createApp({
name: 'api',
cwd: 'api',
script: 'npm run dev',
watch: ['./dist/src'],
env: {
NODE_ENV: 'development',
},
}),
createApp({
name: 'codegen-api',
cwd: 'api',
script: 'npm run codegen -- --watch',
watch: ['codegen.yml'],
}),
createApp({ name: 'app', cwd: 'app', script: 'npm run start' }),
createApp({
name: 'codegen-app',
cwd: 'app',
script: 'npm run codegen -- --watch',
watch: ['codegen.yml'],
}),
],
}