akoa

3.2.1 • Public • Published

akoa

Build Status 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')
 
void async function () {
  const server = await akoa([
    // Koa middleware
    async function middleware01 (ctx, next) {
      /* ... */
      await
        next()
    }
  ]).listen(3000)
 
  /* ... */
 
  await server.close()
 
}().catch((err) => console.error(err))
 

License

This software is released under the MIT License.

Links

/akoa/

    Package Sidebar

    Install

    npm i akoa

    Weekly Downloads

    39

    Version

    3.2.1

    License

    MIT

    Unpacked Size

    17.3 kB

    Total Files

    36

    Last publish

    Collaborators

    • okunishinishi