common.js
4.46 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/**
* 系统配置
*
* @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 = {
app: 'web',
appVersion: '4.9.0', // 调用api的版本
port: 6002,
siteUrl: 'http://www.yohobuy.com',
cookieDomain: '.yohobuy.com',
domains: {
favApi: 'http://192.168.102.31:8092/brower',
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
search: 'http://192.168.102.216:8080/yohosearch/'
},
subDomains: {
host: '.yohobuy.com',
default: '//www.yohobuy.com',
guang: '//guang.yohobuy.com',
list: '//list.yohobuy.com',
search: '//search.yohobuy.com',
huodong: '//huodong.yohobuy.com',
activity: '//activity.yohobuy.com',
index: '//yohobuy.com'
},
useOneapm: false,
useCache: false,
memcache: {
master: ['127.0.0.1:11211'],
slave: ['127.0.0.1:11211'],
session: ['127.0.0.1:11211'],
timeout: 1000,
retries: 0
},
interfaceShunt: {
open: false
},
loggers: {
infoFile: {
close: true,
name: 'info',
level: 'info',
filename: 'logs/info.log',
maxFiles: 7
},
errorFile: {
name: 'error',
level: 'error',
filename: 'logs/error.log',
handleExceptions: true
},
udp: { // send by udp
measurement: 'yohobuy_node_log',
level: 'debug', // logger level
host: 'influxdblog.yohoops.org', // influxdb host
port: '4444' // influxdb port
},
console: {
level: 'info',
colorize: 'all',
prettyPrint: true
}
},
thirdLogin: {
wechat: {
appID: 'wx3ae21dcbb82ad672',
appSecret: 'e78afb2321e6a19085767e1a0f0d52c1'
},
sina: {
appID: '3739328910',
appSecret: '9d44cded26d048e23089e5e975c93df1'
},
qq: {
appID: '100229394',
appSecret: 'c0af9c29e0900813028c2ccb42021792'
},
alipay: {
appID: '2088701661478015',
appSecret: 'kcxawi9bb07mzh0aq2wcirsf9znusobw'
},
douban: {
appID: '03b4e36bf13dc75a0b1eaa43d3b9560e',
appSecret: 'f16d5913e8610672'
},
renren: {
appID: '783130c654c94a77ace97054ae266019',
appSecret: '05e430de8c1e40d3a1f39ca8d3f8252c'
}
},
apiCache: {
cache: true
},
zookeeperServer: '192.168.102.168:2188'
};
if (isProduction) {
Object.assign(module.exports, {
appName: 'www.yohobuy.com',
domains: {
api: 'http://api.yoho.yohoops.org/',
service: 'http://service.yoho.yohoops.org/',
search: 'http://search.yohoops.org/yohosearch/'
},
memcache: {
master: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
slave: ['memcache1.yohoops.org:12112', 'memcache2.yohoops.org:12112', 'memcache3.yohoops.org:12112'],
session: ['memcache1.yohoops.org:12111', 'memcache2.yohoops.org:12111', 'memcache3.yohoops.org:12111'],
poolSize: 25,
reconnect: 5000,
timeout: 300,
retries: 1,
retry: 3000
},
useOneapm: true,
useCache: true,
interfaceShunt: {
open: false,
url: 'http://123.206.2.55/strategy'
},
zookeeperServer: '10.66.1.97:2181'
});
} else if (isTest) {
Object.assign(module.exports, {
appName: 'www.yohobuy.com for test',
domains: {
favApi: 'http://192.168.102.31:8092/brower',
api: process.env.TEST_API || 'http://testapi.yoho.cn:28078/',
service: process.env.TEST_SERVICE || 'http://testservice.yoho.cn:28077/',
search: process.env.TEST_SEARCH || 'http://192.168.102.216:8080/yohosearch/'
},
useOneapm: true,
useCache: true,
memcache: {
master: ['127.0.0.1:12111'],
slave: ['127.0.0.1:12112'],
session: ['127.0.0.1:12111'],
timeout: 1000,
retries: 0
}
});
}