Skip to main content

load_config

Function load_config 

Source
pub fn load_config<T>() -> Result<T, ConfigError>
Expand description

Load configuration into T using layered sources.

Before loading, dotenvy::dotenv() reads a .env file into the process environment (non-fatal if missing). Config crate sources, lowest to highest:

  1. config/{env}.toml where env is read from ARO_ENV (default: "development")
  2. Environment variables with prefix APP_ (separator __)