【文件属性】:
文件名称:koa-action:koa2 mvc框架
文件大小:45KB
文件格式:ZIP
更新时间:2021-05-07 22:09:52
JavaScript
行动
koa2 mvc框架易于使用
environment :Node.js> = 7.6.0
##安装
git clone https://github.com/cqb325/koa-action.git
npm install
npm run server
//in browser
http://127.0.0.1:3000
npm install koa-action -save
create file server.js
##开始
const KoaAction = require('koa-action');
const app = new KoaAction();
app.run();
//run
node server
##约定
1,dir routers是路由器文件,每个文件是基本路由器:在admin.js中:
module.exports = {
'/log
【文件预览】:
koa-action-master
----service()
--------UserService.js(241B)
----views()
--------index.html(252B)
--------error.html(558B)
--------head.html(498B)
--------404.html(0B)
----server.js(83B)
----database()
--------models()
--------database.js(2KB)
----config.js(523B)
----lib()
--------context.js(4KB)
--------utils.js(462B)
--------index.js(6KB)
----LICENSE(1KB)
----README.md(2KB)
----routers()
--------admin.js(516B)
----.gitignore(264B)
----package.json(671B)
----static()
--------favicon.ico(2KB)
--------lib()