common.js
5.36 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/**
* 系统配置
*
* @author hbomb qiqi.zhou@yoho.cn
* @date 2016/05/06
*/
const pkg = require('../package.json');
const isProduction = process.env.NODE_ENV === 'production';
const isTest = process.env.NODE_ENV === 'test';
module.exports = {
app: 'h5',
appVersion: '5.8.0', // 调用api的版本
port: 6006,
siteUrl: '//action.yoho.cn',
assetUrl: `/yoho-activity-platform/${pkg.version}/`,
domains: {
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/'
singleApi: 'http://api.yoho.cn/',
api: 'http://api.yoho.cn/',
service: 'http://api.yoho.cn/',
serviceNotify: 'http://service.yoho.cn/',
platformApi: 'http://172.16.6.210:8088/',
},
corsAllowOrigin: [
'http://localhost:8081',
'http://localhost:1234',
'http://localhost:63342',
'http://huodong.yoho.cn',
'http://ad.yoho.cn',
'https:/ad.yoho.cn',
'http://ad.yhurl.com',
'http://feature.yoho.cn'
],
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: {
name: 'info',
level: 'info',
filename: '/Data/log/yoho-activity-platform/info.log',
maxFiles: 7
},
errorFile: {
name: 'error',
level: 'error',
filename: '/Data/log/yoho-activity-platform/error.log',
handleExceptions: true,
maxFiles: 7
},
console: {
level: 'info',
colorize: 'all',
prettyPrint: true
}
},
mysql: {
connect: {
host: 'localhost',
port: '3306',
user: 'root',
password: ''
},
database: 'yoho_activity_platform',
},
qiniu: {
ACCESS_KEY: 'BwWhoJN536BnV3CzlE20AjNKC9O2bP0l5tFpKsDU',
SECRET_KEY: '_x2VtO7fEmylgjojmLi7qwTBtRm30S8BrO0FxOPK',
BUCKET_NAME: 'cmsimg01'
},
yohoSecret: '3bd815162342d9733f06ab6811082c64',
wechat: {
appID: 'wx1fe49f08f41b6c26',
appSecret: '1360c4a89275e1a4a4bbc8f6c5e44587',
token: 'weixin',
prefix: 'https://api.weixin.qq.com/cgi-bin/',
mpPrefix: 'https://api.weixin.qq.com/cgi-bin/'
}
};
if (isProduction) {
Object.assign(module.exports, {
appName: 'm.yohobuy.com',
siteUrl: 'https://action.yoho.cn',
assetUrl: `/yoho-activity-platform/${pkg.version}/`,
domains: {
api: 'http://api.yoho.yohoops.org/',
service: 'http://service.yoho.yohoops.org/',
global: 'http://api-global.yohobuy.com',
liveApi: 'http://api.live.yoho.cn/',
singleApi: 'http://single.yoho.cn/',
platformApi: 'http://api.platform.yohoops.org'
},
corsAllowOrigin: [
'http://ad.yoho.cn',
'https://ad.yoho.cn',
'http://feature.yoho.cn',
'https://feature.yoho.cn',
'http://huodong.yoho.cn',
'https://huodong.yoho.cn',
'http://ad.yhurl.com'
],
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: 100,
reconnect: 5000,
timeout: 1000,
retries: 0
},
useCache: true,
mysql: {
connect: {
host: '10.67.2.144',
port: '3307',
user: 'yh_vpc_bak',
password: 'yoho@2Y$^YpNb7hp'
},
database: 'yoho_activity_platform',
}
});
} else if (isTest) {
Object.assign(module.exports, {
appName: 'm.yohobuy.com for test',
siteUrl: '//action.yoho.cn',
assetUrl: `/yoho-activity-platform/${pkg.version}/`,
domains: {
api: process.env.TEST_API || 'http://api-test1.yohops.com:9999/',
service: process.env.TEST_SERVICE || 'http://service-test1.yohops.com:9999/',
global: process.env.TEST_GLOBAL || 'http://global-test-soa.yohops.com:9999/',
store: process.env.TEST_STORE || 'http://192.168.102.210:8080/portal-gateway/',
liveApi: process.env.TEST_LIVE || 'http://testapi.live.yohops.com:9999/',
singleApi: process.env.TEST_SINGLE || 'http://api-test1.yohops.com:9999/',
platformApi: 'http://192.168.102.48:8088/'
},
memcache: {
master: ['127.0.0.1:12111'],
slave: ['127.0.0.1:12112'],
session: ['127.0.0.1:12111'],
timeout: 100,
reconnect: 5000,
retries: 0
},
useCache: true,
mysql: {
connect: {
host: 'localhost',
port: '3306',
user: 'root',
password: ''
},
database: 'yoho_activity_platform',
}
});
}