Skip to main content

Module env

Module env 

Source
Expand description

Metadata about the running application — its environment, build, deployment, API gateways, and frontends.

ⓘ
let md = encore::env::app_meta();
if md.environment.r#type == encore::env::EnvironmentType::Production {
    // ...
}
// An app can declare several gateways, so look one up by name.
if let Some(gw) = md.gateway("api") {
    println!("api is at {}", gw.url);
}

Structs§

AppMeta
BuildMeta
DeployMeta
EnvironmentMeta
FrontendMeta
A frontend of the application, and where it is reached.
GatewayMeta
An API gateway serving the application.
HostedService

Enums§

CloudProvider
EnvironmentType

Functions§

app_meta
Returns metadata about the running Encore application.