You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project goal is to have a consistent service that wraps process.env, allowing users to validate if the environment has all required variables and apply any format validations.
The intended usage is something as follows:
1 - Create a function that implements the ValidationFunction interface:
The Environment type refers to the expect environment variables. The validation process
must use the Result pattern to return either the reason for validation error, or the environment object with all values of process.env wrapped.
Here I'm using something like class-validator, so we need to include those decorators to implement the validation function (althrough it would be a Joi schema or anything else);
3 - Use the ConfigurationServiceFactory to get a ConfigurationService instance:
Spec: V1
The project goal is to have a consistent service that wraps
process.env
, allowing users to validate if the environment has all required variables and apply any format validations.The intended usage is something as follows:
1 - Create a function that implements the
ValidationFunction
interface:2 - Create the environment definition:
3 - Use the
ConfigurationServiceFactory
to get aConfigurationService
instance:4 - Get variables using the instance:
The text was updated successfully, but these errors were encountered: