1.0.4 • Published 2 years ago
@npmcorp/joi-env v1.0.4
joi-env
This joi extension provides the ability to compose an object based off of environment variables, complete with validation and type coercion
Usage
const BaseJoi = require('@hapi/joi')
const JoiEnv = require('joi-env')
const Joi = BaseJoi.extend(JoiEnv)
const schema = Joi.object({
myKey: Joi.string().env('MY_KEY')
})