-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathconfig.default.js
93 lines (90 loc) · 2.31 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
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
'use strict';
let appPath = process.cwd();
let config = {
port: 7000,
env: process.env.NODE_ENV || "development", // development production
//mongodb
mongodb: {
uri: "mongodb://127.0.0.1:27017/cms",
options: {},
},
//redis server,used to keep sessions, optional
redis: {
host: "", // Leave blank to disable
port: 6379, // 6379
pass: "",
},
//token time of forget password
findPasswordTill: 24 * 60 * 60 * 1000,
// session secret,
sessionSecret: "SessionSecret",
// jsonwebtoken config
jwt: {
secret: "JWTSecret",
options: {
expiresIn: "10h",
},
},
title: "CMS",
// admin config
admin: {
dir: "admin", // admin router, admin -> http://localhost/admin
role: {
//default roles
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: upload files to local qiniu: use qiniu sdk <https://www.qiniu.com/>(not recommend)
options: {
// Depends on upload type
accessKey: "your key",
secretKey: "your secret",
bucket: "your bucket",
origin: "http://yourdomain.qiniudn.com",
timeout: 3600000,
},
},
},
stopForumSpam: false,
// email config, for login/forget password ...
mail: {
// mail service, [sendgrid](https://sendgrid.com/)(recommend) or [nodemailer](https://nodemailer.com/about/)
type: "sendgrid",
// Sender
from: "[email protected]",
options: {
// nodemailer options: https://nodemailer.com/smtp/
service: "gmail",
host: "",
port: "",
auth: {
user: "",
pass: "",
},
// sendgrid options: https://github.com/sendgrid/sendgrid-nodejs
key: "",
},
},
// google analytics
ga: "",
// Use telegram api to send messages to yourself
// https://github.com/yagop/node-telegram-bot-api
// https://core.telegram.org/bots/api
notify: {
enable: false, // you should set true to enable this feature
token: "",
chatId: "",
prefix: "wenglou",
},
};
module.exports = config;