@@ -43,7 +43,6 @@ if (string.IsNullOrWhiteSpace(enviromentName))
|
||||
? args[index + 1]
|
||||
: "Development";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
var builder = WebApplication.CreateBuilder(new WebApplicationOptions
|
||||
@@ -51,11 +50,23 @@ var builder = WebApplication.CreateBuilder(new WebApplicationOptions
|
||||
EnvironmentName = enviromentName
|
||||
});
|
||||
|
||||
#region 兼容windows 服务命令行的方式
|
||||
|
||||
var urlsIndex = Array.IndexOf(args, "--urls");
|
||||
if (urlsIndex > -1)
|
||||
{
|
||||
builder.WebHost.UseUrls(args[urlsIndex + 1]);
|
||||
}
|
||||
//
|
||||
#endregion
|
||||
|
||||
#region 主机配置
|
||||
|
||||
|
||||
NewId.SetProcessIdProvider(new CurrentProcessIdProvider());
|
||||
|
||||
|
||||
|
||||
builder.Host
|
||||
.ConfigureAppConfiguration((hostContext, config) =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user