Home  >  Article  >  php教程  >  To tp developers, the second version of koahubjs on the road to node

To tp developers, the second version of koahubjs on the road to node

WBOY
WBOYOriginal
2016-09-13 08:45:471294browse

KoaHub.js - Node.js web rapid development framework based on the Koa.js platform
The structure is similar to the thinkphp structure

To tp developers, the second version of koahubjs on the road to nodeInstallation<br> <br> $ npm install koahub<br> Use with koa<br> <br> var app = require('koa')();<br> var router = require('koa-router')();<br> <br> require('koahub');<br> <br> for (var key in koahub.controller){<br> Router.use(key, koahub.controller[key]);<br> }<br> <br> // sample as <br> Router.use('/home', auth('home').skip({path: [/public/]}));<br> app.use(router.routes());<br> <br> // sample as <br> console.log(koahub.model);<br> console.log(koahub.controller);<br> console.log(koahub.util);<br> <br> App.listen(3000); Official website: http://js.koahub.com

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn