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.
koahubjs
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 automatic loading
...
Install
npm install koahubjs --save
Create startup file
//Create start.js startup file
var Koahub = require("koahubjs");
//The default app is the project directory
const app = new Koahub.default();
app.getKoa(); Get koahubjs instantiation and support custom koa middleware
app.run(3000);
Directory structure
// Recommended directory structureapp<br>
--addon<br>
--config<br>
--controller<br>
--data<br>
--model<br>
--util<br>
node_modules<br>
src<br>
--addon<br>
--config<br>
--controller<br>
--data<br>
--model<br>
--util<br>
package.json<br>
start.js
Start the application
node start.js
Startup information:
server running at http://127.0.0.1:3000
Documentation
In production....
Official website
http://js.koahub.com

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver Mac version
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment