The validator (./lib/env/validator.js
) is reponsible for handling and validating environment variables. The schema listed in ./lib/env/schema.js
defines which variables are required, what are their defaults, which regex pattern is required and how to transform the passed values.
For this purpose the schema is an object of objects with the following properties:
-
name <string>
Define the name of the instance variable which exposes the transformed value.
E.g.name="port"
enables access viaenv.port
. -
[required=false] <boolean>