using QuantEngine.Web.Components; using QuantEngine.Infrastructure.Data; using QuantEngine.Infrastructure.Repositories; using QuantEngine.Core.Interfaces; using MudBlazor.Services; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddRazorComponents() .AddInteractiveServerComponents(); // MudBlazor Services builder.Services.AddMudServices(); // PostgreSQL Dapper Setup var connectionString = builder.Configuration.GetConnectionString("DefaultConnection") ?? "Host=127.0.0.1;Database=giteadb;Username=gitea;Password=C8RFlZ9fdQrBA1vyLhLDS4v70I8dJfRS2ERJW4+zsS4=;Search Path=quantengine;"; builder.Services.AddSingleton(new DbConnectionFactory(connectionString)); builder.Services.AddScoped(); builder.Services.AddHttpClient(); var app = builder.Build(); // Enable reverse proxy subpath mapping app.UsePathBase("/quant"); // Configure the HTTP request pipeline. 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();