1.0.0 • Published 5 years ago
fastify-envalid v1.0.0
fastify-envalid
Supports Fastify versions 3.x
Install
npm i fastify-envalidUsage
Require fastify-envalid and register.
const fastify = require('fastify')()
fastify.register(require('fastify-envalid'))
fastify.listen(3000)The plugin will create 3 decorators on your fastify instance:
cleanEnv- A function which is exactlyenvalidcleanEnvvalidators- An object that contains all theenvalidvalidatorsmakeValidator- A function which is exactlyenvalidmakeValidators
Acknowledgements
The code is a port for Fastify of envalid.
License
Licensed under MIT.
1.0.0
5 years ago