@Sgjobfit
Install
npm install @sgjobfit/common
or
yarn add @sgjobfit/common
How to use
const express = require('express');
const app = express();
const { errorHandler, NotFoundError } = require('@sgjobfit/common');
app.all('*', (req, res, next) => {
throw new NotFoundError();
});
app.use(errorHandler);
const PORT = 3000;
app.listen(PORT, () => {
console.log(`App is running on port ${PORT}`);
});
Authors
- lequocduyquang
License
This project is licensed under the MIT License - see the LICENSE.md file for details