luozaichun / conso

Fast, Configurable, Intelligent web framework for node.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fast, Configurable, Intelligent web framework for node.

NPM version NPM quality build status Test coverage David deps NPM download

Installation

$ npm install conso -g

Features

  • ✔︎ Annotation
  • ✔︎ Dependency Injection
  • ✔︎ Configurable
  • ✔︎ Async/Await
  • ✔︎ Database Support Using waterline

Example

you can mapping http://localhost:3000/home/user/:uid via code below

let {Annotation} = require('conso');
let UserModel = require('../model/UserModel');

let {route, get, model} = Annotation;

@route('/home')
class index {

    @model(UserModel)
    user;

    @get('/user/:uid')
    async homePage(ctx, next) {
        let _user = await this.user.findOne({uid: ctx.params.id});
        // await ctx.render('index', {user:_user});
        ctx.json({user:_user});
    }
}

Quick Start

conso has a built-in generator which you can use that to generate an application as shown below:

  • Install the executable.
$ npm install -g conso
  • Create the app:
$ conso init showcase && cd showcase
  • Install dependencies:
$ npm install
  • Start the server:
$ npm start

Then Open http://localhost:3000

Docs & Community

This project uses JSDoc. For the full public API documentation, clone the repository and run npm run doc. This will run JSDoc with the proper options and output the documentation to out/.

Coming soon! Please expecting!

License

MIT

About

Fast, Configurable, Intelligent web framework for node.


Languages

Language:JavaScript 95.6%Language:HTML 2.6%Language:Shell 1.6%Language:CSS 0.2%