express-catch-errors
Generated by OSS Project Generator.
A high-order function to catch errors from promises.
Installation
Install package
$ npm install --save express-catch-errors
Usage
- Router
// user.router.jsconst userController = ; router;
- Controller
// user.controller.jsconst mongoose = ;const User = mongoose; moduleexportslist = async { const users = await User; res;};
Development
- Cloning the repo
$ git clone https://github.com/robertoachar/express-catch-errors.git
- Installing dependencies
$ npm install
- Running scripts
Action | Usage |
---|---|
Starting development mode | npm start |
Linting code | npm run lint |