common.js
1.59 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
57
58
59
60
61
62
63
64
65
66
67
68
/**
* 系统配置
*
* @author hbomb qiqi.zhou@yoho.cn
* @date 2016/05/06
*/
const isProduction = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
module.exports = {
port: 6002,
siteUrl: 'http://localhost:6002/',
domains: {
api: 'http://192.168.102.205:8080/gateway/',
// service: 'http://testservice.yoho.cn:28077/',
service: 'http://service.api.yohobuy.com/',
search: 'http://192.168.102.216:8080/yohosearch/'
},
useOneapm: false,
useCache: false,
memcache: {
master: ['192.168.102.168:12580'],
slave: ['192.168.102.168:12580'],
session: ['192.168.102.168:12580'],
timeout: 5000
},
loggers: {
infoFile: {
name: 'info',
level: 'info',
filename: 'info.log'
},
errorFile: {
name: 'error',
level: 'error',
filename: 'error.log',
handleExceptions: true
},
udp: { // send by udp
level: 'debug', // logger level
host: '192.168.102.162', // influxdb host
port: '4444'// influxdb port
},
console: {
level: 'debug',
colorize: 'all',
prettyPrint: true
}
}
};
if (isProduction) {
Object.assign(module.exports, {
appName: 'www.yohobuy.com',
useOneapm: true,
useCache: true
});
} else if (isTest) {
Object.assign(module.exports, {
appName: 'www.yohobuy.com for test',
useOneapm: true,
useCache: true
});
}