PIbd-23_Ivanov_V.N._Pizzeria/Pizzeria/PizzeriaClientApp/Program.cs

32 lines
712 B
C#
Raw Normal View History

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