2025-06-23 15:07:13 +02:00
|
|
|
using Bimix.UI.Shared;
|
2025-06-19 21:50:35 +02:00
|
|
|
using Bimix.UI.Web.Components;
|
2025-06-23 15:07:13 +02:00
|
|
|
using MudBlazor.Services;
|
2025-06-19 21:50:35 +02:00
|
|
|
|
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
|
|
|
builder.Services.AddRazorComponents()
|
|
|
|
|
.AddInteractiveServerComponents();
|
2025-06-23 15:07:13 +02:00
|
|
|
builder.Services.AddMudServices();
|
|
|
|
|
builder.Services.AddHttpClient("BimixAPI", client =>
|
|
|
|
|
{
|
|
|
|
|
client.BaseAddress = new Uri("https://localhost:7071");
|
|
|
|
|
});
|
2025-06-19 21:50:35 +02:00
|
|
|
|
|
|
|
|
var app = builder.Build();
|
|
|
|
|
|
|
|
|
|
if (!app.Environment.IsDevelopment())
|
|
|
|
|
{
|
|
|
|
|
app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
|
|
|
|
app.UseHsts();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
app.UseHttpsRedirection();
|
|
|
|
|
app.UseStaticFiles();
|
|
|
|
|
app.UseAntiforgery();
|
|
|
|
|
|
|
|
|
|
app.MapRazorComponents<App>()
|
2025-06-23 15:07:13 +02:00
|
|
|
.AddInteractiveServerRenderMode()
|
|
|
|
|
.AddAdditionalAssemblies(typeof(MainLayout).Assembly);
|
2025-06-19 21:50:35 +02:00
|
|
|
|
|
|
|
|
app.Run();
|