Beispiel #1
0
        public void Start()
        {
            thread = new Thread(() =>
            {
                host = new WebHostBuilder()
                       .UseUrls($"http://{ServerConfSetting.serverSettingModel.Server.ip}:{ServerConfSetting.serverSettingModel.Web.port}")
                       .UseKestrel()
                       .UseContentRoot(Directory.GetCurrentDirectory())
                       .UseStartup <Startup>()
                       .Build();

                boot.RUN();

                host.Run();
            });
            thread.Start();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var host = new WebHostBuilder()
                       .UseUrls($"http://{ServerConfSetting.serverSettingModel.Server.ip}:{ServerConfSetting.serverSettingModel.Web.port}")
                       .UseKestrel()
                       .UseContentRoot(Directory.GetCurrentDirectory())
                       .UseStartup <Startup>()
                       .Build();

            var boot = new RatelServerBoot();

            boot.RUN();

            host.Run();


            boot.Close();
        }