express-stackman
v0.2.0
Published
Show rich stacktraces in express application
Downloads
139
Maintainers
Readme
express-stackman
Enrich Express error handler which inserts source code within stack frames.
Usage
Install module:
npm i express-stackman --save
Insert middleware into your express application after all routes and other middlewares:
var app = require('express')();
app.get('/', function () {
throw new Error('Bang!');
});
if (process.env.NODE_ENV === 'development') {
app.use(require('express-stackman')());
}
Options
All options passed to stackman directly.
context
- The lines of context to be loaded on each side of the callsite line (default:7
)
You can see instant example by doing this:
npm i
node example
open http://localhost:3000
(If you not - write an issue, we will figure it out)
License
MIT (c) 2014 Vsevolod Strukchinsky ([email protected])