https://github.com/anytv/anytv-node-error-handler
https://github.com/anytv/anytv-node-error-handler
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/anytv/anytv-node-error-handler
- Owner: anyTV
- License: mit
- Created: 2015-01-20T23:15:07.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-07-22T07:12:15.000Z (almost 4 years ago)
- Last Synced: 2025-03-09T17:44:50.733Z (4 months ago)
- Language: JavaScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 34
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# anytv-node-error-handler
[](https://travis-ci.org/anyTV/anytv-node-error-handler)
[](https://coveralls.io/github/anyTV/anytv-node-error-handler?branch=master)
[](https://david-dm.org/anyTV/anytv-node-error-handler)
[](https://badge.fury.io/js/anytv-node-error-handler)Our error handler middleware for expressjs. Especially made for our awesome expressjs [boilerplate](https://github.com/anyTV/anytv-node-boilerplate).
# Install
```sh
npm install anytv-node-error-handler --save
```# Usage
### Setting the middlware
On your index.js / server.js / app.js, register the middleware.
```javascript
import error_handler from 'anytv-node-error-handler';
import express from 'express';app = express();
app.use(error_handler(logger));
```# Contributing
Install the tools needed:
```sh
npm install mocha -g
npm install --dev
```# Running test
```sh
npm test
npm test-dev #to --watch
```# Code coverage
```sh
npm run coverage
```
Then open coverage/lcov-report/index.html.# License
MIT
# Author
[Freedom! Labs, any.TV Limited DBA Freedom!](https://www.freedom.tm)