Skip to main content

load_appsettings

Function load_appsettings 

Source
pub fn load_appsettings(mode: AppMode) -> Option<Value>
Expand description

Load the merged appsettings JSON (base + environment overlay + env overrides).

按运行模式自动合并对应的 appsettings.{Mode}.json overlay:

  • Developmentappsettings.Development.json
  • Productionappsettings.Production.json

Environment variables prefixed with APP__ override the corresponding JSON values. For example, APP__App__Address=0.0.0.0:8080 overrides {"App": {"Address": "..."}}.