jungles-middleware-general

0.1.0 • Public • Published

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; });

/jungles-middleware-general/

    Package Sidebar

    Install

    npm i jungles-middleware-general

    Weekly Downloads

    1

    Version

    0.1.0

    License

    none

    Last publish

    Collaborators

    • enome