diff --git a/Readme.md b/Readme.md index ab77d12..da49202 100644 --- a/Readme.md +++ b/Readme.md @@ -65,9 +65,12 @@ import Five from '@gm5/core' var app = new Five() app.set({ website: 'www.your_domain.com' }) -// app.set({ domain: 'your_domain.com' }) // 设置域,cookie用到,不设置则等同于website -// app.set({ VIEWS: './views/' }) // [可选], 但是要用到模板渲染页面时, 必须指定 +// 设置域,cookie用到,不设置则等同于website +// app.set({ domain: 'your_domain.com' }) + +// [可选], 但是要用到模板渲染页面时, 必须指定 +// app.set({ views: { enabled: true, dir: './views/'} }) app.preload('./apps/') // [必须], 预加载应用目录 diff --git a/config/index.js b/config/index.js index f8509cd..0732211 100644 --- a/config/index.js +++ b/config/index.js @@ -11,7 +11,6 @@ export default { db: {}, session: { enabled: false, - type: 'native', // native 或 redis ttl: 3600 * 24 * 7, domain: '', // NODESSID域, 默认等于domain level: 0, // 校验级别, 0: 不校验客户端, 2: ua, 4: ip, 6: ua + ip diff --git a/middleware/router.js b/middleware/router.js index 620676e..96d13d7 100644 --- a/middleware/router.js +++ b/middleware/router.js @@ -4,7 +4,7 @@ * @date 2020/09/18 15:16:29 */ -export default function(req, res, next) { +export default function (req, res, next) { var debug = this.get('debug') // 1. 先判断控制器是否存在 diff --git a/package.json b/package.json index e5827ee..4a3ff86 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "author": "yutent ", "main": "index.js", "dependencies": { - "@gm5/session": "^1.0.0", + "@gm5/session": "^1.1.1", "@gm5/request": "^1.2.3", "@gm5/response": "^1.3.1", "@gm5/controller": "^1.0.0", @@ -21,7 +21,9 @@ "type": "git", "url": "https://github.com/bytedo/gmf.core.git" }, - "keywords": ["five, fivejs, node-five, five.js, nodejs, mvc, koa, express"], + "keywords": [ + "five, fivejs, node-five, five.js, nodejs, mvc, koa, express" + ], "engines": { "node": ">=10.0.0" },