@naxmefy/koa-controllers
koa2 controllers
Last updated 4 years ago by naxmefy .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @naxmefy/koa-controllers 
SYNC missed versions from official npm registry.

node-koa-controllers

npm version

Build Status Coverage Status

Installation

$ npm install --save @naxmefy/koa-controllers

Usage

import * as Controllers from '@naxmefy/koa-controllers'

class MyKoaController extends Controllers.AppController {
  async myUsers (ctx) {
    this.body = yield ctx.db.findMyUsers()
  }

  async myUsersView (ctx) {
    ctx.state.users = yield ctx.db.findMyUsers()
    ctx.render('userListView')
  }
}

Current Tags

  • 0.2.0                                ...           latest (4 years ago)

2 Versions

  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |