Iceshrimp.NET/Iceshrimp.Frontend/Startup.cs
2024-04-03 18:33:25 +02:00

14 lines
No EOL
562 B
C#

using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Iceshrimp.Frontend;
using Iceshrimp.Frontend.Core.Services;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");
builder.Services.AddSingleton(_ => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddSingleton<ApiClient>();
builder.Services.AddSingleton<ApiService>();
await builder.Build().RunAsync();