index.js
1.11 KB
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
51
52
53
54
55
56
const path = require('path');
const isProduction = process.env.NODE_ENV === 'production';
module.exports = {
delay: 500,
dbDir: path.join(__dirname, '../db'),
loggers: [{
silent: true,
type: 'dailyfile',
level: 'info',
filename: 'logs/info.log',
}, {
silent: true,
type: 'dailyfile',
level: 'error',
filename: 'logs/error.log',
}, {
type: 'console',
level: 'debug',
}]
};
if (isProduction) {
Object.assign(module.exports, {
database: {
connect: {
host: 'write.ufo.yohoops.org',
port: '3306',
user: 'yh_vpc_bak',
password: 'yoho@2Y$^YpNb7hp',
charset: 'utf8mb4',
timezone: '+08:00'
},
database: 'ufo_product',
},
monitorReport: {
host: '10.66.4.25',
port: 8086,
db: 'web_monitor',
},
});
} else {
Object.assign(module.exports, {
database: {
connect: {
host: '192.168.102.219',
port: '3306',
user: 'yh_test',
password: 'yh_test',
charset: 'utf8mb4',
timezone: '+08:00'
},
database: 'ufo_product',
},
});
}