第二弹 koahub KoaHub.js -- 基于 Koa.js 平台的 Node.js web 快速开发框架
KoaHub.js – 基于 Koa.js 平台的 Node.js web 快速开发框架 结构上仿thinkphp结构
Installation
$ npm install koahub
Use with koa
var app = require('koa')();
var router = require('koa-router')();
require('koahub');
for (var key in koahub.controller){
router.use(key, koahub.controller[key]);
}
// sample as
router.use('/home', auth('home').skip({path: [/public/]}));
app.use(router.routes());
// sample as
console.log(koahub.model);
console.log(koahub.controller);
console.log(koahub.util);
app.listen(3000);