0.0.0 • Published 6 years ago

koa-preuse v0.0.0

Weekly downloads
35
License
MIT
Repository
github
Last release
6 years ago

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();
} )