using IOModuleTestBlazor; using IOModuleTestBlazor.Components; using IOModuleTestBlazor.Services; var builder = WebApplication.CreateBuilder(args); // ── CAN bus ─────────────────────────────────────────────────────────────────── builder.Services.AddSingleton(); builder.Services.AddHostedService(); // ── Blazor ──────────────────────────────────────────────────────────────────── builder.Services.AddRazorComponents() .AddInteractiveServerComponents(); var app = builder.Build(); if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Error", createScopeForErrors: true); app.UseHsts(); } app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true); app.UseHttpsRedirection(); app.UseAntiforgery(); app.MapStaticAssets(); app.MapRazorComponents() .AddInteractiveServerRenderMode(); app.Run();