node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org »



Simple way to create middleware that should not modify the response.

Takes care of errors.

Useful for tasks like updating the database.

Example '/user/:id',
    exec (req, next) -> dao.user.update req.params.idreq.bodynext

Without exec '/user/:id',
    dao.user.update req.params.idreq.body(err) ->
        if err?
            res.writeHead 500
            res.end 'Internal Server Error'


bind was developed with snd during a project. The initial idea is from snd. I refactored the library and provided unit tests.