1.0.3 • Published 5 years ago

experror v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

Experror

Express.js middleware for HTTP error response objects

Installation

$ npm i experror

Usage

const app = require('express')()
const experror = require('experror')

app.use(experror)

app.get('/', (req, res) => res.error(404, 'Custom message'))
app.listen(8081)

Sample response

{
  "status": 503,
  "error": "ServiceUnavailable",
  "message": "Service unavailable"
}
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago