EnvironmentHelper Deep Dive
A specialized utility class responsible for managing the Node.js environment variables before any other Archibald service is initialized.
Key Methods
load(params)
- Role: Finds and parses the correct
.envand.env.{environment}files usingdotenv. - Precedence: Ensures that environment variables sit on
process.envso that theConfigServicecan later perform secret interpolation on theconfig.jstemplate.
getEnvFilePath()
Calculates the physical path to the environment file based on the current platform, tenant, and environment name, supporting both standard Archibald paths and custom project structures.