You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
643 B

1 year ago
  1. var builder = WebApplication.CreateBuilder(args);
  2. // Add services to the container.
  3. builder.Services.AddControllersWithViews();
  4. var app = builder.Build();
  5. // Configure the HTTP request pipeline.
  6. if (!app.Environment.IsDevelopment())
  7. {
  8. app.UseExceptionHandler("/Home/Error");
  9. // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
  10. app.UseHsts();
  11. }
  12. app.UseHttpsRedirection();
  13. app.UseStaticFiles();
  14. app.UseRouting();
  15. app.UseAuthorization();
  16. app.MapControllerRoute(
  17. name: "default",
  18. pattern: "{controller=Home}/{action=Index}/{id?}");
  19. app.Run();