-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
executable file
·73 lines (73 loc) · 2.26 KB
/
config.js
File metadata and controls
executable file
·73 lines (73 loc) · 2.26 KB
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
// 设置应用程序根目录
const rootPath = __dirname;
/** 框架参数设置 */
exports.config = {
name: "gvsoft framework",
version: "1.0.1",
/** 是否自动加载数据库配置 */
autoloadoption: true,
/** 框架根目录 */
rootPath: rootPath,
/** 目录结构定义 */
catalog: {
upload: "public/resource/avatar/", // 上传文件存放目录
"request-handler": "lib/request-handlers", // request-handler 存放目录
"server-handler": "lib/server-handlers", // server-handler 存放目录
"controller": [
"lib/controllers",
"../common-controllers"
], // controller 存放目录
"typeextend": "lib/extends", // typeextends 存放目录
"module": "lib/modules", // modules 存放目录
"client": "lib/clients" // clients 存放目录
},
/** 中间件参数设置 */
middleware: {
/** 文件操作中间件参数设置 */
fsh: {
/** 扫描忽略的目录名称 */
ignore: [".git", ".svn", ".DS_Store"]
},
/** 日志记录器中间件参数设置 */
logger: {
debug: true,
info: true,
warn: true,
error: true,
sql: true
}
},
/** 模块参数设置 */
module: {
ignore: ["clients"],
app: {
site: [
// { domain: 'ROOT', path: '../common-ui-port/' }
{ domain: 'peanut', path: '/Users/wangxin/workspace/peanut-vr/src/main/webapp' }
],
public: "public,../common-ui-port/", // 公共目录,默认为public
view: "views", // 视图目录,默认为views
engine: "html", // 页面试图引擎,默认为html
/** Session 相关设置 */
session: {
secret: "12345",
//name: 'MYAPPNAME', //这里的name值得是cookie的name,默认cookie的name是:connect.sid
cookie: { maxAge: 30 * 1000 * 60 }, //设置maxAge是80000ms,即80s后session和相应的cookie失效过期
resave: false,
saveUninitialized: true
}
}
},
/** 数据库参数设置 */
database: {
mysql: {
connectionLimit: 30,
host: "127.0.0.1",
password: "admin",
user: "root",
database: "nodejs",
waitForConnections: false,
charset: "UTF8_GENERAL_CI"
}
}
};