PIbd-22_Katysheva_N.E._Pizz.../Pizzeria/PizzeriaClientApp/Program.cs

32 lines
712 B
C#
Raw Normal View History

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