Show rich stacktraces in express application
npm install express-stackmanEnrich Express error handler which inserts source code within stack frames.
Install module:
npm i express-stackman --save
Insert middleware into your express application __after all routes and other middlewares__:
``javascript
var app = require('express')();
app.get('/', function () {
throw new Error('Bang!');
});
if (process.env.NODE_ENV === 'development') {
app.use(require('express-stackman')());
}
`
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:
`bash``
npm i
node example
open http://localhost:3000
!screen shot 2014-11-02 at 6 41 19 pm
(If you not - write an issue, we will figure it out)
MIT (c) 2014 Vsevolod Strukchinsky (floatdrop@gmail.com)
[npm-url]: https://npmjs.org/package/express-stackman
[npm-image]: http://img.shields.io/npm/v/express-stackman.svg?style=flat
[travis-url]: https://travis-ci.org/floatdrop/express-stackman
[travis-image]: http://img.shields.io/travis/floatdrop/express-stackman.svg?style=flat
[coveralls-url]: https://coveralls.io/r/floatdrop/express-stackman
[coveralls-image]: http://img.shields.io/coveralls/floatdrop/express-stackman.svg?style=flat
[depstat-url]: https://david-dm.org/floatdrop/express-stackman
[depstat-image]: http://img.shields.io/david/floatdrop/express-stackman.svg?style=flat