Program.cs 706 B

123456789101112131415161718192021222324252627
  1. using BlazorEditForms.Components;
  2. var builder = WebApplication.CreateBuilder(args);
  3. // Add services to the container.
  4. builder.Services.AddRazorComponents()
  5. .AddInteractiveServerComponents();
  6. var app = builder.Build();
  7. // Configure the HTTP request pipeline.
  8. if (!app.Environment.IsDevelopment())
  9. {
  10. app.UseExceptionHandler("/Error", createScopeForErrors: true);
  11. // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
  12. app.UseHsts();
  13. }
  14. app.UseHttpsRedirection();
  15. app.UseStaticFiles();
  16. app.UseAntiforgery();
  17. app.MapRazorComponents<App>()
  18. .AddInteractiveServerRenderMode();
  19. app.Run();