public static void Run(WebServer.WebServer server) { RegisterAssemblyName(); try { server.Run(); } catch (Exception ex) { Console.WriteLine($"{ex.Message} {ex.InnerException}"); } }
public static void Run(WebServer.WebServer server) { RegisterAssemblyName(); RegisterControllersData(); RegisterViewsData(); RegisterModelsData(); try { server.Run(); } catch (Exception e) { Console.WriteLine(e.Message); } }
public static void Start(IMvcApplication application) { var container = new ServiceCollection(); application.ConfigureServices(container); var controllerRouter = new ControllerRouter(container); var resourceRouter = new ResourceRouter(); var customRouter = new CustomRouter(); var router = new HttpHandlerContext(controllerRouter, resourceRouter, customRouter); application.Configure(); var server = new WebServer.WebServer(HOSTING_PORT, router); server.Run(); }
public static void runServer() { string srv; if (Config.LocalhostOnly) { srv = "localhost"; } else { srv = "+"; } WebServer.WebServer ws = new WebServer.WebServer(SendResponse, string.Format("http://{0}:{1}/", srv, Config.Port)); ws.Run(); Console.WriteLine("Akira webserver. Press any key to quit."); Console.ReadKey(); ws.Stop(); }