PIbd-22_Isaeva_A.I._FishFac.../FishFactoryClientApp/Program.cs

22 lines
664 B
C#
Raw Normal View History

using FishFactoryClientApp;
2024-04-17 12:51:33 +04:00
var builder = WebApplication.CreateBuilder(args);
2024-04-17 12:51:33 +04:00
// Add services to the container.
builder.Services.AddControllersWithViews();
2024-04-17 12:51:33 +04:00
var app = builder.Build();
APIClient.Connect(builder.Configuration);
2024-04-17 12:51:33 +04:00
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
2024-04-17 12:51:33 +04:00
{
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();
2024-04-17 12:51:33 +04:00
}
app.UseStaticFiles();
app.UseRouting();
2024-04-17 12:51:33 +04:00
app.UseAuthorization();
app.MapControllerRoute(
2024-05-12 12:56:51 +04:00
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
app.Run();