pub fn load_dotenv(
project_dir: impl AsRef<Path>,
environment: &str,
) -> Result<(), ConfigError>Expand description
Loads .env files from project_dir.
Order (missing files are skipped):
.env.env.local(skipped whenenvironmentisprod).env.{environment}.env.{environment}.local
Later files override earlier ones. Variables already present in the process environment before this call are never changed.
ยงErrors
Returns ConfigError::Dotenv when a present file fails to parse.