@bondsports/error-express-handler
v1.0.0
Published
TypeScript and JavaScript classes for osm elements
Downloads
3
Maintainers
Keywords
Readme
error-express-handler
This package exports a middleware for express that handles Error and HttpError(custom package type).
Install
npm install --save @bondsports/error-express-handler
Usage
import express from 'express';
import { getErrorHandlerMiddleware } from '@bondsports/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');
});