Files
hcs/Hcs.WebApp/Program.cs

25 lines
478 B
C#

using Hcs.WebApp.Components;
var builder = WebApplication.CreateBuilder(args);
builder.Services
.AddRazorComponents()
.AddInteractiveServerComponents();
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();
app.Run();