Skip to content

Connect-Chain composes a connect middleware from a chain of middlewares to be called in series.

License

Notifications You must be signed in to change notification settings

goodeggs/connect-chain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Connect-Chain

Connect-Chain is middleware that composes a new middleware from a chain of middlewares to be called in series.

An error passed to next or thrown in a middleware will short circuit the chain and be passed to the next middleware in the connect middleware chain.

Usage

var express = require('express');
var chain = require('connect-chain');

var app = express();

app.use(chain(middleware1, middleware2));
var middleware = chain(middleware1, middleware2);
middleware(req, res, next);

Contributing

$ git clone https://github.com/goodeggs/connect-chain && cd connect-chain
$ npm install
$ npm test

About

Connect-Chain composes a connect middleware from a chain of middlewares to be called in series.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages