Express Router with promises.
Allows you to define express routes that return promises instead of calling
npm install --save promised-router
If the promise resolves successfully, then it is sent to
Otherwise, if the promise rejects, then the error reason is passed to
router object can be passed to an ordinary
express.use('/path', router) call.
It also supports
.use(), with the only other difference being that error handlers are now added using
.error() instead of
.use(). This was done because it depends on
fn.length which can be counter-intuitive sometimes.
const Router = ;moduleexports =
... translates to ...
const Router = Router;moduleexports =