@map-colonies/error-express-handler

2.1.0 • Public • Published

error-express-handler

This package exports a middleware for express that handles Error and HttpError(custom package type).

Install

npm install --save @map-colonies/error-express-handler

Usage

import express from 'express';
import { getErrorHandlerMiddleware } from '@map-colonies/error-express-handler';

process.env.NODE_ENV = 'development';

const app = express();

app.use('/meow', fn);

app.use(getErrorHandlerMiddleware());

app.listen(8080, function() {
    console.log('server is up');
});

Flow

Flow of package

Readme

Keywords

none

Package Sidebar

Install

npm i @map-colonies/error-express-handler

Weekly Downloads

1,888

Version

2.1.0

License

ISC

Unpacked Size

7.64 kB

Total Files

7

Last publish

Collaborators

  • netanelc
  • mapcolonies
  • syncush
  • asaf.masa
  • schnitz
  • konchashlomicl
  • shimoncohen
  • alebinson
  • tropface