2025-10-11 11:33:46 +02:00
|
|
|
using BimAI.UI.Shared;
|
|
|
|
|
using BimAI.UI.Shared.Extensions;
|
|
|
|
|
using BimAI.UI.Shared.Interfaces;
|
|
|
|
|
using BimAI.UI.Shared.Services;
|
|
|
|
|
using BimAI.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();
|
2025-07-17 14:29:02 +02:00
|
|
|
|
|
|
|
|
builder.Services.AddSharedServices("http://localhost:7142");
|
|
|
|
|
|
2025-07-17 19:17:27 +02:00
|
|
|
builder.Services.AddSingleton<IScannerService, NoOpScannerService>();
|
2025-07-19 22:50:38 +02:00
|
|
|
builder.Services.AddScoped<AuthService>();
|
|
|
|
|
|
2025-07-17 19:17:27 +02:00
|
|
|
|
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();
|