Convert appsettings.json into environment variables
Appsettings.json
{
"SmtpServer": "smtp.example.com",
"Logging": [
{
"Name": "ToEmail",
"Level": "Critical",
"Args": {
"FromAddress": "[email protected]",
"ToAddress": "[email protected]"
}
},
{
"Name": "ToConsole",
"Level": "Information"
}
]
}
Environment variables
setx SmtpServer=smtp.example.com
setx Logging__0__Name=ToEmail
setx Logging__0__Level=Critical
setx [email protected]
setx [email protected]
setx Logging__1__Name=ToConsole
setx Logging__1__Level=Information