using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.WebAssembly.Hosting; using VisaApiClient; namespace BlazorWebAssemblyVisaApiClient; public class Program { public static async Task Main(string[] args) { var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); //todo move to launch settings const string baseAddress = "https://localhost:44370"; //todo make pretty builder.Services.AddScoped(_ => new HttpClient { BaseAddress = new Uri(baseAddress) }); builder.Services.AddScoped(sp => new Client(baseAddress, sp.GetRequiredService())); await builder.Build().RunAsync(); } }