shopping-cart-blazor-wasm/Client/Program.cs

12 lines
440 B
C#
Raw Permalink Normal View History

2021-11-09 11:44:08 +01:00
using Microsoft.AspNetCore.Components.Web;
2020-06-19 10:20:16 +02:00
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
2021-11-09 11:44:08 +01:00
using ShoppingCartStarter.Client;
2020-06-19 10:20:16 +02:00
2021-11-09 11:44:08 +01:00
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");
2020-06-19 10:20:16 +02:00
2021-11-09 11:44:08 +01:00
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
2020-06-19 10:20:16 +02:00
2021-11-09 11:44:08 +01:00
await builder.Build().RunAsync();