PIbd-21_Blokhin_D.A._FishFa.../FishFactory/FishFactoryClientApp/Program.cs

29 lines
497 B
C#
Raw Normal View History

2024-04-18 18:38:50 +04:00
using FishFactoryClientApp;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllersWithViews();
var app = builder.Build();
APIClient.Connect(builder.Configuration);
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
app.Run();