express-stackman

0.2.0 • Public • Published

express-stackman NPM version Build Status Dependency Status

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

screen shot 2014-11-02 at 6 41 19 pm

(If you not - write an issue, we will figure it out)

License

MIT (c) 2014 Vsevolod Strukchinsky (floatdrop@gmail.com)

Package Sidebar

Install

npm i express-stackman

Weekly Downloads

11

Version

0.2.0

License

MIT

Last publish

Collaborators

  • floatdrop