Commit 9291d205 authored by Maodashu's avatar Maodashu

修改环境变量检查配置

parent 9376d174
......@@ -28,7 +28,8 @@ namespace OTWebSocket.API
NLogBuilder.ConfigureNLog($"nlog.config");
ConfigurationBuilder configurationBuilder = new ConfigurationBuilder();
string settingsFileName = "appsettings.json";
if (Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT").Equals("Development"))
var env = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
if (!string.IsNullOrEmpty(env) &&env.Equals("Development"))
{
settingsFileName = "appsettings.Development.json";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment