@sgjobfit/common

npm install @sgjobfit/common

Usage no npm install needed!

<script type="module">
  import sgjobfitCommon from 'https://cdn.skypack.dev/@sgjobfit/common';
</script>

README

@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