KoaHub.js - Node.js web rapid development framework based on the Koa.js platform. Features such as ES6/7 (Generator Function, Class, Async & Await) can be used directly in the project. With Babel compilation, it can run stably in the Node.js environment.
Introduction
KoaHub.js - Node.js web rapid development framework based on the Koa.js platform. Features such as ES6/7 (Generator Function, Class, Async & Await) can be used directly in the project. With Babel compilation, it can run stably in the Node.js environment. //base controller, admin/controller/base.controller.js<br>
export default class extends koahub.http{<br>
<br>
constructor() {<br>
super();<br>
console.log('base constructor');<br>
}<br>
<br>
isLogin(){<br>
console.log('base isLogin');<br>
}<br>
}<br>
<br>
//index controller, admin/controller/index.controller.js<br>
import base from "./base.controller";<br>
export default class extends base{<br>
<br>
constructor() {<br>
super();<br>
console.log('index constructor');<br>
}<br>
<br>
index() {<br>
super.isLogin();<br>
super.json({msg: 'this is a msg'});<br>
console.log('index index');<br>
}<br>
}
All features in ES6/7 can be used in the project. With the help of Babel compilation, it can run stably in the Node.js environment of >=0.12.0.
Features
Support all koa middleware
Supports using all features of ES2015+ to develop projects
Supports breakpoint debugging of ES2015+ projects
Supports multiple project structures and multiple project environments
Support multi-level Controller
Support MySQL database
...
Download
git clone https://github.com/einsqing/koahubjs.git
Install dependencies
cd koahubjs
npm install
Start applying
npm run compile
npm run start
Startup information:
server running at http://127.0.0.1:3000
Documentation
In production....
Official website
[http://js.koahub.com]http://js.koahub.com