0.0.2 • Published 5 months ago

@matzapata/common v0.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

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