PIbd-22_Chernyshev_Shabunov.../ComputerShopGuarantorApp/Program.cs
2024-05-28 13:22:24 +04:00

31 lines
701 B
C#

using ComputerShopGuarantorApp;
var Builder = WebApplication.CreateBuilder(args);
// Add services to the container.
Builder.Services.AddControllersWithViews();
var App = Builder.Build();
ApiUser.Connect(Builder.Configuration);
// Configure the HTTP request pipeline.
if (!App.Environment.IsDevelopment())
{
App.UseExceptionHandler("/Home/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.UseHttpsRedirection();
App.UseStaticFiles();
App.UseRouting();
App.UseAuthorization();
App.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
App.Run();