PIbd22_Kuznetsov_A.V._Sewin.../SewingDresses/SewingDressesClientApp/Program.cs

28 lines
527 B
C#
Raw Normal View History

2024-05-26 13:34:14 +04:00
using SewingDressesClientApp;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllersWithViews().AddRazorRuntimeCompilation();
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();