Needlessly Postulating Minds
Miss any of our Open RFC calls?Watch the recordings here! »

@dkx/http-middleware-condition

0.0.1 • Public • Published

DKX/Http/Middleware/Condition

Condition middleware for @dkx/http-server.

Installation

$ npm install --save @dkx/http-middleware-condition

or with yarn

$ yarn add @dkx/http-middleware-condition

Usage

const {Server} = require('@dkx/http-server');
const {conditionMiddleware} = require('@dkx/http-middleware-condition');
 
const app = new Server;
 
app.use(conditionMiddleware(async function(request, response, state) {
    return true;
}));

If false is returned, no further middleware will be called.

Keywords

none

Install

npm i @dkx/http-middleware-condition

DownloadsWeekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

4.5 kB

Total Files

9

Last publish

Collaborators

  • avatar