示例#1
0
文件: Program.cs 项目: CryptLink/Host
        public static IWebHostBuilder CreateWebHostBuilder(string[] args)
        {
            if (args.Count() == 1)
            {
                int.TryParse(args[0], out Port);
            }

            var W = WebHost.CreateDefaultBuilder(args)
                    .UseStartup <Startup>()
                    .UseKestrel(options => {
                options.Listen(System.Net.IPAddress.Any, Port, loptions => {
                    loptions.UseHttps(HostCert.GetX509Certificate());
                });
            });

            return(W);
        }