static void Main(string[] args) { WebAppMap.AddDirectory(); WebServer server = new WebServer(); server.Run(); }
public void Run() { Console.WriteLine("write calculator or cake: "); while (true) { var choose = Console.ReadLine(); if (choose == "cake") { var mainApplication = new ByTheCakeApplication(); var appRouteConfig = new AppRouteConfig(); mainApplication.Start(appRouteConfig); var webServer = new WebServer(1337, appRouteConfig); webServer.Run(); break; } else if (choose == "calculator") { var mainApplication = new MainApplication(); var appRouteConfig = new AppRouteConfig(); mainApplication.Start(appRouteConfig); var webServer = new WebServer(1337, appRouteConfig); webServer.Run(); break; } else { Console.WriteLine("write calculator or cake: "); } } }
static void Main(string[] args) { var webServer = new WebServer("http://localhost:1234/"); webServer.Run(); Console.WriteLine("Press key to finish!"); webServer.Stop(); }
private static void Main(string[] _) { var webServer = new WebServer($"http://localhost:{WebServer.PortNumber}/"); webServer.Run(); Console.ReadKey(); webServer.StopListening(); }
public void RunTest1() { WebServer ws = new WebServer(SendResponse, "http://localhost:8080/test/"); ws.Run(); Console.WriteLine("A simple webserver. Press a key to quit."); Console.ReadKey(); ws.Stop(); }
// This is part of the server code, and shows you your server is running and gives you a way to easily stop it. private static void Main(string[] args) { var ws = new WebServer(SendResponse, "http://localhost:8080/test/"); ws.Run(); Console.WriteLine("A simple webserver. Press a key to quit."); Console.ReadKey(); ws.Stop(); }
static void Main(string[] args) { var ws = new WebServer(SendResponse, "http://localhost:8080/headers/"); ws.Run(); Console.WriteLine("Press any key to quit."); Console.ReadKey(); ws.Stop(); }
static void Main(string[] args) { var mainApplication = new MainApplication(); var appRouteConfig = new AppRouteConfig(); mainApplication.Start(appRouteConfig); var webServer = new WebServer(1337, appRouteConfig); webServer.Run(); }
public void Run() { var mainApp = new MainApplication(); var routeConfig = new AppRouteConfig(); mainApp.Configure(routeConfig); var webServer = new WebServer(1337, routeConfig); webServer.Run(); }
public void Run() { var mainApplication = new ByTheCakeApplication(); var appRouteConfig = new AppRouteConfig(); mainApplication.Start(appRouteConfig); var webServer = new WebServer(1337, appRouteConfig); webServer.Run(); }
public void Run() { var mainApplication = new MainApplication(); var appRouteConfig = new AppRouteConfig(); mainApplication.Configure(appRouteConfig); var webServer = new WebServer(Port, appRouteConfig); webServer.Run(); }
public void Run() { ByTheCakeApp mainApplication = new ByTheCakeApp(); AppRouteConfig appRouteConfig = new AppRouteConfig(); mainApplication.Configure(appRouteConfig); WebServer webServer = new WebServer(Port, appRouteConfig); webServer.Run(); }
public void Run() { var mainApplication = new GameStoreApplication(); mainApplication.InitializeDatabase(); var appRouteConfig = new AppRouteConfig(); mainApplication.Configure(appRouteConfig); var webServer = new WebServer(1337, appRouteConfig); webServer.Run(); }
private static void Main(string[] args) { List <string> listUrls = new List <string>(); listUrls.Add("http://localhost:4000/login/"); listUrls.Add("http://localhost:4000/FetchTwitterFeed/"); var ws = new WebServer(SendResponse, listUrls.ToArray()); ws.Run(); Console.WriteLine("A simple webserver. Press a key to quit."); Console.ReadKey(); ws.Stop(); }
public void Run() { //ByTheCakeApp mainApplication = new ByTheCakeApp(); GameStoreApp mainApplication = new GameStoreApp(); mainApplication.InitializeDatabase(); AppRouteConfig appRouteConfig = new AppRouteConfig(); mainApplication.Configure(appRouteConfig); WebServer webServer = new WebServer(Port, appRouteConfig); webServer.Run(); }
public void Run() { //var mainApplication = new MainApplication(); var mainApplication = new ByTheCakeApp(); mainApplication.InitializeDatabase(); var appRouteConfig = new AppRouteConfig(); mainApplication.Configure(appRouteConfig); var webServer = new WebServer(Port, appRouteConfig); webServer.Run(); }
public void Run() { // NOTE: To Start working with your DB - put '.' in the connection string // instead of my DB server address !!! var mainApplication = new ByTheCakeApp(); mainApplication.InitializeDatabase(); var appRouteConfig = new AppRouteConfig(); mainApplication.Configure(appRouteConfig); var webServer = new WebServer(Port, appRouteConfig); webServer.Run(); }
static void Main(string[] args) { var options = new Options(); if (Parser.Default.ParseArguments(args, options)) { var root = options.Root; if (!Directory.Exists(root)) { Logger.Log( Resources.InvalidPathMessage); } else { var port = options.Port; var isVerbose = options.Verbose; var webServer = new WebServer.WebServer(root, port, isVerbose); webServer.Run(); Console.ReadKey(); webServer.Stop(); } } }