PIbd-21_KozyrevSS_SewingDre.../SewingDresses/SewingDressesClientApp/Program.cs

28 lines
527 B
C#
Raw Normal View History

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