Skip to content
 
 

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Middleware for NodeJS

Zero dependencies middleware implementation. Each middleware function shall be called with any number of arguments, reference to next function shall be passed as the last argument;

Installation

npm install --save middleware-nodejs

Usage

import:

const middleware = require('middleware-js')();

pass middleware function:

middleware.use((req, res, next) => {
	//...
    next();
});

note that next() call is required to continue chain execution.

to kick of the chain run:

middleware.handle(req, res);

About

Zero dependencies middleware pattern implementation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages