Skip to content

Instantly share code, notes, and snippets.

@manoj-choudhari-git
Created April 14, 2021 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manoj-choudhari-git/58d52325782f68f08911decc2c1912b5 to your computer and use it in GitHub Desktop.
Save manoj-choudhari-git/58d52325782f68f08911decc2c1912b5 to your computer and use it in GitHub Desktop.
Environment specific appsettings to override values from appsettings.json.
// appsettings.Development.json
{
"Mode": "Development"
}
// appsettings.Test.json
{
"Mode": "Test"
}
// appsettings.Staging.json
{
"Mode": "Staging"
}
// appsettings.Production.json
{
"Mode": "Production"
}
// If object is nested deep, then this approach would need you to
// recreate the nesting in the environment specific file.
// as shown below for just overriding Default LogLevel setting.
// {
// "Logging": {
// "LogLevel": {
// "Default": "Information"
// }
// }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment