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