/// <summary>Main entry-point for this application.</summary> /// <param name="args">An array of command-line argument strings.</param> public static void Main(string[] args) { // setup our configuration (command line > environment > appsettings.json) Configuration = new ConfigurationBuilder() .AddJsonFile("appsettings.json", optional: true) .AddEnvironmentVariables() .Build(); // update configuration to make sure listen url is properly formatted Regex regex = new Regex(_regexBaseUrlMatch); Match match = regex.Match(Configuration["Client_Internal_Url"]); Configuration["Client_Internal_Url"] = match.ToString(); // initialize managers ClientManager.Init(); EndpointManager.Init(); WebsocketManager.Init(); // create our service host CreateHostBuilder(args).Build().StartAsync(); // create our web host CreateWebHostBuilder(args).Build().Run(); }