-
Notifications
You must be signed in to change notification settings - Fork 80
/
config.default.js
executable file
·67 lines (54 loc) · 1.27 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
'use strict';
const fs = require('fs');
const path = require('path');
module.exports = appInfo => {
const config = {};
// should change to your own
config.keys = appInfo.name + '_1489816290616_7711';
config.siteFile = {
'/favicon.ico': fs.readFileSync(path.join(appInfo.baseDir, 'app/public/favicon.png')),
};
config.view = {
defaultViewEngine: 'nunjucks',
mapping: {
'.tpl': 'nunjucks',
},
};
config.redis = {
client: {
host: '127.0.0.1',
port: '6379',
password: '',
db: '0',
},
};
config.sessionRedis = {
name: '', // single redis does not need to config name
};
config.sequelize = {
dialect: 'mysql', // support: mysql, mariadb, postgres, mssql
database: 'tftime',
host: 'localhost',
port: '3306',
username: 'root',
password: '',
};
config.weappSDK = {
appId: '', // your weapp appId
appSecret: '', // weapp appSecret
};
config.security = {
csrf: {
ignoreJSON: true, // 默认为 false,当设置为 true 时,将会放过所有 content-type 为 `application/json` 的请求
},
};
// Qcloud Cloud Object Storage
config.cos = {
secretId: '',
secretKey: '',
appId: '',
bucket: '',
folder: '',
};
return config;
};