static void Main(string[] args) { string url = args.Length > 0 ? args[0] : "http://localhost:7777/"; string webRoot = args.Length > 1 ? args[1] : Path.Combine(Environment.CurrentDirectory, "webroot"); var bp = new BlockProvider(Width, Height); var ap = new AnimalProvider(); var pp = new PlantProvider(); using (var server = new WebServer(bp, ap, pp, url, webRoot)) using (var task = RunServer(server, () => { ap.Update(); pp.Update(); })) { _log.Info("Server started on {0}.", url); _log.Info("WebRoot: {0}", webRoot); Console.WriteLine("Press any key to stop.", url, webRoot); Console.ReadLine(); stopped = true; task.Wait(); } }