Home > php教程 > php手册 > body text

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

WBOY
Release: 2016-09-13 08:45:47
Original
1343 people have browsed it

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

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template