PIbd-22_Chernyshev_Shabunov.../ComputerShopGuarantorApp/Program.cs
2024-05-29 01:02:20 +04:00

29 lines
699 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();