Skip to content

Repository files navigation

errorhandler

NPM VersionNPM DownloadsBuild StatusTest CoverageGratipay

Development-only error handler middleware

Install

$ npm install errorhandler

API

varerrorhandler=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

varconnect=require('connect')varerrorhandler=require('errorhandler')varapp=connect()if(process.env.NODE_ENV==='development'){// only use in developmentapp.use(errorhandler())}

License

MIT

About

Development-only error handler middleware

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors