This commit is contained in:
37
BimAI.UI.Web/Program.cs
Normal file
37
BimAI.UI.Web/Program.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using BimAI.UI.Shared;
|
||||
using BimAI.UI.Shared.Extensions;
|
||||
using BimAI.UI.Shared.Interfaces;
|
||||
using BimAI.UI.Shared.Services;
|
||||
using BimAI.UI.Web.Components;
|
||||
using MudBlazor.Services;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddRazorComponents()
|
||||
.AddInteractiveServerComponents();
|
||||
builder.Services.AddMudServices();
|
||||
|
||||
builder.Services.AddSharedServices("http://localhost:7142");
|
||||
|
||||
builder.Services.AddSingleton<IScannerService, NoOpScannerService>();
|
||||
builder.Services.AddScoped<AuthService>();
|
||||
|
||||
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
||||
app.UseHsts();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
app.UseStaticFiles();
|
||||
app.UseAntiforgery();
|
||||
|
||||
app.MapRazorComponents<App>()
|
||||
.AddInteractiveServerRenderMode()
|
||||
.AddAdditionalAssemblies(typeof(MainLayout).Assembly);
|
||||
|
||||
app.Run();
|
||||
Reference in New Issue
Block a user