PIbd-22_Shabunov_O.A._AutoW.../AutoWorkshopShopApp/Program.cs

31 lines
713 B
C#

using AutoWorkshopShopApp;
var Builder = WebApplication.CreateBuilder(args);
// Add services to the container.
Builder.Services.AddControllersWithViews();
var App = Builder.Build();
ApiClient.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();