last-error-middleware
Middleware for catching the last express.js
error and rendering it as json or an error page.
Installation
$ npm install last-error-middleware
Example
var lastError = ; app
API
.LastError(options)
Construct a last-error
middleware generator with custom options
. The defaults are:
"pages": {} // status code to html template path "stack": false // return the error stack with json responses
on('err', ..)
Emitted on every error.
var lastError = ; var errors =
License
WWWWWW||WWWWWW
W W W||W W W
||
( OO )__________
/ | \
/o o| MIT \
\___/||_||__||_|| *
|| || || ||
_||_|| _||_||
(__|__|(__|__|