using Microsoft.AspNetCore.Components.Authorization; using Microsoft.Extensions.FileProviders; using MxUiCanary.Components; using ZB.MOM.WW.MxGateway.Server.Dashboard; var builder = WebApplication.CreateBuilder(args); builder.WebHost.UseUrls("http://127.0.0.1:0"); builder.WebHost.UseStaticWebAssets(); builder.Services.AddRazorComponents().AddInteractiveServerComponents(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); var app = builder.Build(); app.UseStaticFiles(new StaticFileOptions { FileProvider = new PhysicalFileProvider(Path.GetFullPath("../../../src/ZB.MOM.WW.MxGateway.Server/wwwroot")) }); app.UseStaticFiles();app.UseAntiforgery(); app.MapRazorComponents().AddInteractiveServerRenderMode(); app.MapGet("/provenance",()=>new { theme=typeof(ZB.MOM.WW.Theme.ThemeShell).Assembly.GetName().Version?.ToString(), syntheticOnly=true }); app.Run();