2024-05-28 22:41:22 +04:00
|
|
|
using StoreKeeperClient;
|
2024-05-01 19:43:56 +04:00
|
|
|
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
2024-05-28 22:41:22 +04:00
|
|
|
builder.Services.AddControllersWithViews();
|
2024-05-01 19:43:56 +04:00
|
|
|
|
|
|
|
var app = builder.Build();
|
2024-05-28 22:41:22 +04:00
|
|
|
APIClient.Connect(builder.Configuration);
|
2024-05-01 19:43:56 +04:00
|
|
|
|
|
|
|
// Configure the HTTP request pipeline.
|
|
|
|
if (app.Environment.IsDevelopment())
|
|
|
|
{
|
2024-05-28 22:41:22 +04:00
|
|
|
app.UseExceptionHandler("/Home/Error");
|
|
|
|
app.UseHsts();
|
2024-05-01 19:43:56 +04:00
|
|
|
}
|
|
|
|
|
2024-05-28 22:41:22 +04:00
|
|
|
app.UseStaticFiles();
|
|
|
|
app.UseRouting();
|
|
|
|
|
2024-05-01 19:43:56 +04:00
|
|
|
app.UseAuthorization();
|
|
|
|
|
2024-05-28 22:41:22 +04:00
|
|
|
app.MapControllerRoute(
|
|
|
|
name: "default",
|
2024-05-29 18:48:47 +04:00
|
|
|
pattern: "{controller=Home}/{action=Enter}/{id?}");
|
2024-05-01 19:43:56 +04:00
|
|
|
|
|
|
|
app.Run();
|