Last active
January 23, 2020 18:16
-
-
Save shcyiza/42fb5554df8de72ecd229d5095d2b26d to your computer and use it in GitHub Desktop.
access env var in dotnet core
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Logging": { | |
"LogLevel": { | |
"Default": "Debug", | |
"System": "Information", | |
"Microsoft": "Information" | |
} | |
}, | |
"Jwt": { | |
"Key": "veryVerySecretKey", | |
"Issuer": "auth_server_brx" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Logging": { | |
"LogLevel": { | |
"Default": "Debug", | |
"System": "Information", | |
"Microsoft": "Information" | |
} | |
}, | |
"Jwt": { | |
"Key": "veryVerySecretKey", | |
"Issuer": "auth_server_brx" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Startup(IConfiguration configuration) | |
{ | |
Configuration = configuration; | |
StaticConfig = configuration; | |
} | |
public static IConfiguration Env { get; private set; } | |
// to use simply call the static member from anywher in the app | |
// Startup.Env["Jwt:issuer"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Startup(IConfiguration configuration) | |
{ | |
Configuration = configuration; | |
StaticConfig = configuration; | |
} | |
public static IConfiguration Env { get; private set; } | |
// to use simply call the static member from anywher in the app | |
// Startup.Env["Jwt:issuer"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment