/// <summary> /// Defines the entry point of the application. /// </summary> /// <param name="args">The arguments.</param> static void Main(string[] args) { var url = "http://localhost:9696/"; string webHookUrl = ""; if (args.Length > 0) { MainUrl = webHookUrl = args[0]; GrafanaUrl = args[1]; } // Our web server is disposable. using (var server = CreateWebServer(url)) { // Once we've registered our modules and configured them, we call the RunAsync() method. server.RunAsync(); //var browser = new System.Diagnostics.Process() //{ // StartInfo = new System.Diagnostics.ProcessStartInfo(url) { UseShellExecute = true } //}; //browser.Start(); var result = TelegramBotManager.UpdateWebHook(webHookUrl + "/api/message").Result; // Wait for any key to be pressed before disposing of our web server. // In a service, we'd manage the lifecycle of our web server using // something like a BackgroundWorker or a ManualResetEvent. Console.ReadKey(true); } }