Function leptos::get_configuration
source · pub async fn get_configuration(
path: Option<&str>
) -> impl Future<Output = Result<ConfFile, LeptosConfigError>>
Expand description
Loads LeptosOptions from a Cargo.toml with layered overrides. If an env var is specified, like LEPTOS_ENV
,
it will override a setting in the file. It takes in an optional path to a Cargo.toml file. If None is provided,
you’ll need to set the options as environment variables or rely on the defaults. This is the preferred
approach for cargo-leptos. If Some(“./Cargo.toml”) is provided, Leptos will read in the settings itself. This
option currently does not allow dashes in file or folder names, as all dashes become underscores