node package manager
Painless code sharing. npm Orgs help your team discover, share, and reuse code. Create a free org »

jungles-middleware-general

General Middleware

General middleware written for Jungles but can be used with any Express.js app.

Render

app.get('/', render('index'));

Redirect

app.get('/', redirect('/somewhere'));

Send

Takes a function that returns the value to be send. The 'this' of the function is { req, res }.

middleware.send(function () { return this.res.locals.user; });