Skip to content
Docs Try Aspire

IHostEnvironment

Interface
📦 Aspire.Hosting v13.2.0
interface IHostEnvironment {
isDevelopment(): boolean;
isEnvironment(environmentName: string): boolean;
isProduction(): boolean;
isStaging(): boolean;
}

Methods

method isDevelopment
Checks if running in Development environment
isDevelopment(): boolean
boolean
method isEnvironment
Checks if the environment matches the specified name
isEnvironment(environmentName: string): boolean
environmentName string
boolean
method isProduction
Checks if running in Production environment
isProduction(): boolean
boolean
method isStaging
Checks if running in Staging environment
isStaging(): boolean
boolean