using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using MudBlazor.Services; var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); builder.Services.AddSingleton(sp => new HttpClient { BaseAddress = new Uri(builder.Configuration.GetValue("BaseUrl")) }); builder.Services.AddMudServices(); builder.Services.AddSingleton(); var host = builder.Build(); var gameDataService = host.Services.GetRequiredService(); #if DEBUG await gameDataService.InitializeAsync(builder.Configuration.GetValue("DataBaseUrl")); #else await gameDataService.InitializeAsync(builder.Configuration.GetValue("BaseUrl")); #endif await host.RunAsync();