1 | module.exports = appInfo => {
|
2 | const config = {}
|
3 |
|
4 | config.test = {
|
5 | key: 'syllabus-test-key'
|
6 | }
|
7 |
|
8 | /**
|
9 | * 小程序无需开启csrf
|
10 | */
|
11 | config.security = {
|
12 | csrf: false
|
13 | }
|
14 | /**
|
15 | * errCatch中间件配置
|
16 | * 默认不返回错误信息给客户端
|
17 | */
|
18 | config.errCatch = {
|
19 | responseErrorMsg: false
|
20 | }
|
21 |
|
22 | // 默认错误码配置,需要覆盖
|
23 | config.errCode = {
|
24 | APP_ERROR_CODE: '00', // 应用错误码
|
25 | NOT_REGISTER_ERROR: '000000', // 未登记默认错误码
|
26 | }
|
27 |
|
28 | // 前端socket代理配置
|
29 | config.socketProxy = {
|
30 | // server: 'http://localhost:7001'
|
31 | }
|
32 |
|
33 | // 输出json日志
|
34 | config.logger = {
|
35 | outputJSON: true
|
36 | }
|
37 |
|
38 | return config
|
39 | }
|