node-http-error-handler

0.1.0 • Public • Published

node-http-error-handler

Simple Express.js error handler middleware for

const errorLogging = process.env.NODE_ENV === 'development'
const errors = require('node-http-error-handler')(errorLogging)
...
app.use(errors)

Usage

errors([logging Boolean])

Returns the middleware function. The logging argument is optional, and defaults to false. If true, the error handler will print 4xx and 5xx errors to the console, including a stack trace for 5xx errors.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.0
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    1

Package Sidebar

Install

npm i node-http-error-handler

Weekly Downloads

1

Version

0.1.0

License

ISC

Last publish

Collaborators

  • colophonemes