public static void Main(string[] args) { var bootstrapper = new AppCoreBootstrapper(); bootstrapper.Run(); Console.WriteLine("-----------------------"); Console.WriteLine("Press Enter to quit..."); Console.ReadLine(); bootstrapper.Shutdown(); }
public static void Main(string[] args) { Console.WriteLine("-----------------------"); Console.WriteLine("Press Ctrl+C to quit..."); Console.WriteLine("-----------------------"); var bootstrapper = new AppCoreBootstrapper(); string WebApiUrl = "http://*:88"; bootstrapper.Run(); var owinHost = WebApp.Start <StartupWebApi>(WebApiUrl); var mre = new ManualResetEvent(false); Console.CancelKeyPress += delegate { bootstrapper.Shutdown(); owinHost.Dispose(); mre.Set(); }; mre.WaitOne(); }