2024-05-28 22:41:22 +04:00
|
|
|
using VendorClient;
|
|
|
|
|
2024-05-01 19:39:07 +04:00
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
|
|
2024-05-28 22:41:22 +04:00
|
|
|
builder.Services.AddControllersWithViews();
|
2024-05-01 19:39:07 +04:00
|
|
|
|
|
|
|
var app = builder.Build();
|
2024-05-28 22:41:22 +04:00
|
|
|
APIClient.Connect(builder.Configuration);
|
2024-05-01 19:39:07 +04:00
|
|
|
|
|
|
|
if (app.Environment.IsDevelopment())
|
|
|
|
{
|
2024-05-28 22:41:22 +04:00
|
|
|
app.UseExceptionHandler("/Home/Error");
|
|
|
|
app.UseHsts();
|
2024-05-01 19:39:07 +04:00
|
|
|
}
|
|
|
|
|
2024-05-28 22:41:22 +04:00
|
|
|
app.UseStaticFiles();
|
|
|
|
app.UseRouting();
|
|
|
|
|
2024-05-01 19:39:07 +04:00
|
|
|
app.UseAuthorization();
|
|
|
|
|
2024-05-28 22:41:22 +04:00
|
|
|
app.MapControllerRoute(
|
|
|
|
name: "default",
|
|
|
|
pattern: "{controller=Home}/{action=Index}/{id?}");
|
2024-05-01 19:39:07 +04:00
|
|
|
|
|
|
|
app.Run();
|