Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

errorhandler

NPM Version NPM Downloads Build Status Test Coverage Gratipay

Development-only error handler middleware

Install

$ npm install errorhandler

API

var errorhandler = require('errorhandler')

errorhandler()

Create new middleware to handle errors and respond with content negotiation. This middleware is only intended to be used in a development environment, as the full error stack traces will be sent back to the client when an error occurs.

Example

var connect = require('connect')
var errorhandler = require('errorhandler')

var app = connect()

if (process.env.NODE_ENV === 'development') {
  // only use in development
  app.use(errorhandler())
}

License

MIT

About

Development-only error handler middleware

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors