using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using ASTRAIN.Client; using ASTRAIN.Client.Services; var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); var apiBaseAddress = builder.Configuration["ApiBaseAddress"]; var baseAddress = string.IsNullOrWhiteSpace(apiBaseAddress) ? builder.HostEnvironment.BaseAddress : apiBaseAddress; builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(baseAddress) }); builder.Services.AddScoped(); builder.Services.AddScoped(); await builder.Build().RunAsync();