Skip to main content
Skip table of contents

Configuration Overview

DpeNanoServices is based on Microsoft .Net Core. Microsoft .Net Core offers the following built-in ways for specifying configuration:

  • appsettings.json file (lowest priority)

  • environment variables

  • command-line options (highest priority)

See also https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-7.0

Configuring an option in appsettings.json

Example: DpeLogging | UseFileLogger

CODE
{
...
  "DpeLogging": {
    "UseFileLogger": true,
  }
...
}

Configuring an option with environment varriables

Example: DpeLogging | UseFileLogger

According to the hierarchical structure of appsettings.json options the environment variable name is derived by adding double underscores between hierarchies

CODE
set DpeLogging__UseFileLogger=true

Configuring an option from command line

Example: DpeLogging | UseFileLogger

According to the hierarchical structure of appsettings.json options the command-line option name is derived by adding a colon between hierarchies

CODE
dotnet DpeNanoServices DpeLogging:UseFileLogger=true
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.