@saflib/env
@saflib/env
Interfaces
Interface | Description |
---|---|
EnvEnvSchema | Environment variables for the @saflib/env package, including inherited variables. Generated by @saflib/env . To update, make changes to the adjacent env.schema.json , navigate to the package root, and run npm exec saf-env generate . |
Variables
Variable | Description |
---|---|
typedEnv | process.env casted to the EnvEnvSchema type. |
Functions
Function | Description |
---|---|
validateEnv | Given process.env and a schema, validate the environment variables. Throws an error if the environment variables are invalid. Run this when your service starts to ensure typedEnv conforms to the schema. |