1.0.0 • Published 9 years ago

express-errs v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

express-errors

Express middleware for displaying Rails-inspired error pages for development environments with error name, message, stack trace and extracted code around source of error.

Note: It does not swallow errors, they still get the same usual output in the console.

Tip: Looking for koa version?

Installation

$ npm install express-errs --save

Question: Why is the name so weird? Because express is so popular, it was impossible to find a normal name for this package.

Usage

var express = require('express');
var errors = require('express-errs');

var app = express();

app.get('/', function (req, res) {
  throw new Error('Oh no!');
  
  res.end('Oh yes!');
});

app.use(errors());

app.listen(3000);

npm.io

License

express-errors is released under the MIT license.