Glee
Glee is a JavaScript package that provides Express middleware for request and response validation.
The middleware uses Joi - the popular Hapi-ecosystem validation library - for validation and validates request path params, query params, headers, and body, and the response headers and body.
Glee aims to provide a Hapi-like validation experience for the Express ecosystem.
Online Documentation
GitHub Repo
NPM Package
Installation
Install using yarn:
yarn add @jych/glee
or npm:
npm install @jych/glee
Example Usage
Using Glee is as simple as creating a Glee instance and then passing a Joi Schema to one of it's "get validator" methods. The result is an Express Middleware.
; ; ;; ; app.get '/', queryValidatorMw,;
Contributing
Pull requests are welcome. Please report issues on the issue traker.
License
Glee uses the MIT license.