diff --git a/middleware/router.js b/middleware/router.js index 29941ab..2026210 100644 --- a/middleware/router.js +++ b/middleware/router.js @@ -31,7 +31,10 @@ export default function (req, res, next) { // 4. 优先执行__main__方法 if (app.__main__) { try { - await app.__main__() + let r = await app.__main__() + if (r === false) { + return + } } catch (err) { return Promise.reject(err) } diff --git a/package.json b/package.json index 41d5147..0754838 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gm5/core", - "version": "1.1.1", + "version": "1.1.2", "type": "module", "description": "Five.js, 一个轻量级的nodejs mvc框架 旨在简单易用, 5分钟即可上手", "author": "yutent ", @@ -14,7 +14,7 @@ "@gm5/views": "^1.0.0", "crypto.js": "^2.0.2", "es.shim": "^2.0.1", - "iofs": "^1.5.0" + "iofs": "^1.5.3" }, "devDependencies": {}, "repository": {