@matzapata/common
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Middlewares

Require auth

Requires env variable JWT_KEY Check for it's value and throws otherwise Decodes the jwt and sets it to req.currentUser

Error handler

Catches global errors and generate standard responses for them following the CustomError structure

Validate request

Throws errors for express-validator errors

/@matzapata/common/

    Package Sidebar

    Install

    npm i @matzapata/common

    Weekly Downloads

    1

    Version

    0.0.2

    License

    ISC

    Unpacked Size

    26.4 kB

    Total Files

    42

    Last publish

    Collaborators

    • matzapata