Sha256: 3e752b9f04f37b6711345d9309791069970fe151e98bd02f44589ed5b4976f53

Contents?: true

Size: 1.56 KB

Versions: 17

Compression:

Stored size: 1.56 KB

Contents

# errorhandler

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Build Status][travis-image]][travis-url]
[![Test Coverage][coveralls-image]][coveralls-url]
[![Gratipay][gratipay-image]][gratipay-url]

Development-only error handler middleware

## Install

```sh
$ npm install errorhandler
```

## API

```js
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

```js
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](LICENSE)

[npm-image]: https://img.shields.io/npm/v/errorhandler.svg?style=flat
[npm-url]: https://npmjs.org/package/errorhandler
[travis-image]: https://img.shields.io/travis/expressjs/errorhandler.svg?style=flat
[travis-url]: https://travis-ci.org/expressjs/errorhandler
[coveralls-image]: https://img.shields.io/coveralls/expressjs/errorhandler.svg?style=flat
[coveralls-url]: https://coveralls.io/r/expressjs/errorhandler?branch=master
[downloads-image]: http://img.shields.io/npm/dm/errorhandler.svg?style=flat
[downloads-url]: https://npmjs.org/package/errorhandler
[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg?style=flat
[gratipay-url]: https://www.gratipay.com/dougwilson/

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
hooch-0.4.2 jasmine/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
hooch-0.4.1 jasmine/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
hooch-0.4.0 jasmine/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
hooch-0.3.0 jasmine/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
hooch-0.2.1 jasmine/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
hooch-0.2.0 jasmine/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
hooch-0.1.0 jasmine/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
hooch-0.0.8 jasmine/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
hooch-0.0.7 jasmine/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
hooch-0.0.6 jasmine/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
entangled-0.0.16 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
entangled-0.0.15 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
entangled-0.0.14 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
entangled-0.0.13 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
entangled-0.0.12 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
entangled-0.0.11 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md
entangled-0.0.10 spec/dummy/public/node_modules/karma/node_modules/connect/node_modules/errorhandler/README.md