You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
642 B
26 lines
642 B
5 months ago
|
using Microsoft.AspNetCore.Hosting;
|
||
|
using OfficeOpenXml;
|
||
|
using System.Threading.Tasks;
|
||
|
|
||
|
namespace WcfControlMonitorWebLib
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Web 宿主程序
|
||
|
/// </summary>
|
||
|
public class WebHost
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// 启动
|
||
|
/// </summary>
|
||
|
public static Task Startup(string url)
|
||
|
{
|
||
|
ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
|
||
|
return Microsoft.AspNetCore.WebHost
|
||
|
.CreateDefaultBuilder(new string[] { "--urls", url })
|
||
|
.UseStartup<Startup>()
|
||
|
.Build()
|
||
|
.RunAsync();
|
||
|
}
|
||
|
}
|
||
|
}
|