akoa
Async wrapper for koa server
Last updated 10 months ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install akoa 
SYNC missed versions from official npm registry.

akoa

Build Status Code Climate Code Coverage npm Version JS Standard

Async wrapper for koa server

Installation

$ npm install akoa --save

Usage

#!/usr/bin/env node

/**
 * This is an example to run akoa server
 */
'use strict'

const akoa = require('akoa')
const co = require('co')

co(function * () {
  let server = yield akoa([
    // Koa middleware
    co.wrap(function * middleware01 (ctx, next) {
      /* ... */
      yield next()
    })
  ]).listen(3000)

  /* ... */

  yield server.close()

}).catch((err) => console.error(err))

License

This software is released under the MIT License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 12
Dependencies (6)
Dev Dependencies (10)
Dependents (3)

Copyright 2014 - 2017 © taobao.org |