connect-chain

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

1 个版本
安装
npm install connect-chain
yarn add connect-chain
pnpm add connect-chain
bun add connect-chain
README

Connect-Chain

Connect-Chain composes a connect 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
版本列表
0.0.1 2013-12-17