Skip to main content

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 .env and .env.{environment} files using dotenv.
  • Precedence: Ensures that environment variables sit on process.env so that the ConfigService can later perform secret interpolation on the config.js template.

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.