Skip to content

@saflib/env


@saflib/env

Interfaces

InterfaceDescription
EnvEnvSchemaEnvironment 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

VariableDescription
typedEnvprocess.env casted to the EnvEnvSchema type.

Functions

FunctionDescription
validateEnvGiven 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.