0.0.0 • Published 6 years ago
koa-preuse v0.0.0
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();
} )
0.0.0
6 years ago