koa-preuse

0.0.0 • Public • Published

koa-preuse

Prepending a middleware to the beginning of the middleware list for Koa application.

Installation

$ npm i koa-preuse --save

Usage

const Koa = require( 'koa' );
const preuse = require( 'koa-preuse' );
 
const app = new Koa();
 
app.use( () => {} ); // Middleware One
 
preuse( app, ( ctx, next ) => {
    // this middleware will be executed before the "Middleware One"
    next();
} )

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i koa-preuse

    Weekly Downloads

    180

    Version

    0.0.0

    License

    MIT

    Unpacked Size

    2.66 kB

    Total Files

    4

    Last publish

    Collaborators

    • lvchengbin