1.0.6 • Published 4 years ago

@sgjobfit/common v1.0.6

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
4 years ago

@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