Create separate configuration files named with the environment suffix (e.g., appsettings.Development.json
, appsettings.Production.json
). Set the environment by defining the ASPNETCORE_ENVIRONMENT
variable. The configuration system automatically loads the appropriate file based on the environment.