forked from ss1121/FKP-REST
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
109 lines (93 loc) · 3.51 KB
/
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
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
var path = require('path');
//微信公众号配置文件
var agzgz = {
token: '_agzgz',
appid: 'wxec91673b97ce1463',
appsecret: '2c2c9312a61cd9aa0eca16e2e8939cfb',
encodingAESKey: ''
}
//微信公众号配置文件
var cqch = {
token: '_cqch',
appid: 'yyyyyyyyyyyyyyy',
appsecret: 'yyyyyyyyyyyyyyy',
encodingAESKey: 'yyyyyyyyyyyyyyy'
}
var static_dir = './public'
var version = '2.8.5'
var config = {
version: version,
// 默认首页
root: 'dbdemo', //dev 或者 pro默认首页
//本地上传路径
upload: path.join(static_dir,'/dist/'),
upload_root: path.join(static_dir,'/dist/uploader'),
// 用户头像目录
avatar: path.join(static_dir,'/dist/'),
avatar_root: path.join(static_dir,'/dist/avatar'),
// 阿里云图片路径
goods_img: 'http://jh-ljs-goods.oss-cn-shenzhen.aliyuncs.com/', //商品
account_img:'http://jh-ljs-account.oss-cn-shenzhen.aliyuncs.com/', //用户
// weixintest: cqch,
// domaintest: 'test.agzgz.com',
//微信
weixin: agzgz, // 微信模块调用参数
//api
apiip: "http://120.25.xxx.xxx", // api src 参考 根目录/pages/common/apilist.js
port: ":8080/v1/", // api src port 参考 根目录/pages/common/apilist.js
domain: 'agzgz.com',
// 第三方登陆
auth: {
github:{ //第三方github登陆
clientID: 'd65a863ee074f62231c5',
clientSecret: '9f4a6a2f93c7c23405378c70bb2ae1c618734985',
callbackURL: 'http://www.agzgz.com/github/callback',
successUrl: '/dbdemo',
userKey: 'githubuser', //save this key to session
headers: {"user-agent": "love_gz"}
}
},
//部署test环境
// 测试需要的test环境
// 开发环境: ./ly dev 启动本地环境
// 测试环境: pm2 start index.js -- test
// 生产环境: pm2 start index.js
test: {
weixin: cqch,
domain: 'test.agzgz.com',
apiip: '192.168.1.100',
port: ':8088/v1/',
auth: {
//本地环境使用github登陆,使用 ./ly dev test
github:{
clientID: 'b1ba9181f8928e4cbfa2',
clientSecret: 'cb598749e899bc20514a4b9f583974fd13457550',
callbackURL: 'http://localhost:3000/github/callback',
successUrl: '/dbdemo',
userKey: 'githubuser', //save this key to session
headers: {"user-agent": "bendi"}
}
}
},
//静态资源路径
static: {
dft: path.join(static_dir,'/dist/'+version+'/'),
html: path.join(static_dir,'/dist/'+version+'/html'),
js: path.join(static_dir,'/dist/'+version+'/js'),
css: path.join(static_dir,'/dist/'+version+'/css'),
img: path.join(static_dir,'/dist/'+version+'/images'),
test: {
dft: path.join(static_dir,'/dist/'+version+'/dev'),
html: path.join(static_dir,'/dist/'+version+'/dev/html'),
js: path.join(static_dir,'/dist/'+version+'/dev/js'),
css: path.join(static_dir,'/dist/'+version+'/dev/css'),
img: path.join(static_dir,'/dist/'+version+'/dev/images')
}
},
// 静态资源映射文件
// 如果后端使用java/php的模板,将map文件交给后端映射路径
mapJson: path.join(static_dir,'/dist/'+version+'/map.json'),
mapDevJson: path.join(static_dir,'/dist/'+version+'/dev/map.json'),
}
module.exports = config
// 数据库配置见db/config.js