| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using Microsoft.AspNetCore.Hosting.StaticWebAssets;
- using RackPeek.Web.Components;
- namespace RackPeek.Web;
- public class Program
- {
- public static void Main(string[] args)
- {
- var builder = WebApplication.CreateBuilder(args);
- StaticWebAssetsLoader.UseStaticWebAssets(
- builder.Environment,
- builder.Configuration
- );
-
- // Add services to the container.
- builder.Services.AddRazorComponents()
- .AddInteractiveServerComponents();
-
- var app = builder.Build();
- // Configure the HTTP request pipeline.
- if (!app.Environment.IsDevelopment())
- {
- app.UseExceptionHandler("/Error");
- // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
- app.UseHsts();
- }
- app.UseStatusCodePagesWithReExecute("/not-found", createScopeForStatusCodePages: true);
- app.UseHttpsRedirection();
- app.UseStaticFiles();
- app.UseAntiforgery();
- app.MapStaticAssets();
- app.MapRazorComponents<App>()
- .AddInteractiveServerRenderMode();
- app.Run();
- }
- }
|