forked from wengqianshan/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.default.js
53 lines (51 loc) · 1.49 KB
/
config.default.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
var appPath = process.cwd();
var config = {
port: 7000,
env: 'development',
//mongodb配置信息
mongodb: {
uri: 'mongodb://localhost/cms',
options: {}
},
//找回密码hash过期时间
findPasswordTill: 24 * 60 * 60 * 1000,
//后台相关配置
admin: {
dir: 'admin', //后台访问路径,如http://localhost/admin配置为admin
role: {//默认角色名,后期可修改
admin: 'admin',
user: 'user'
}
},
upload: {
tmpDir: appPath + '/public/uploaded/tmp',
uploadDir: appPath + '/public/uploaded/files',
uploadUrl: '/uploaded/files/',
maxPostSize: 100 * 1024 * 1024, // 100M
minFileSize: 1,
maxFileSize: 50 * 1024 * 1024, // 50M
acceptFileTypes: /.+/i,
storage: {
type: 'local',//保存类型,如果保存到本地可省略或local, 目前支持7牛:qiniu
options: {
accessKey: 'your key',
secretKey: 'your secret',
bucket: 'your bucket',
domain: 'your domain',
timeout: 3600000, // default rpc timeout: one hour, optional
}
}
},
mail: {
from: '[email protected]',
//service: '',
options: {
host: '10.1.1.1',
auth: {
user: 'username',
pass: 'password'
}
}
}
};
module.exports = config;