connect-stack

0.1.6 • Public • Published

connect-stack

Stack multiple connect/express middlewares into a single middleware function

example

myauth.js:

var stack = require('connect-stack'),
    connect = require('connect');
 
function myAuth(req, res, next) {
    //TODO: write auth code
}
 
module.exports = stack(connect.cookieParser(), 
    connect.session({secret: 'hush'}),
    myAuth);
 

app.js

app.use('/secret-area', require('./myauth'));

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.668latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.668
0.1.50
0.1.41
0.1.31
0.1.20
0.1.10

Package Sidebar

Install

npm i connect-stack

Weekly Downloads

70

Version

0.1.6

License

MIT

Last publish

Collaborators

  • spion