Merge branch 'master' of github.com:bytedo/gmf.core

v1
宇天 2021-04-14 15:35:34 +08:00
commit f4649ec323
4 changed files with 10 additions and 6 deletions

View File

@ -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/') // [必须], 预加载应用目录

View File

@ -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

View File

@ -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. 先判断控制器是否存在

View File

@ -6,7 +6,7 @@
"author": "yutent <yutent.io@gmail.com>",
"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"
},