PIbd-23_Elatomtsev_L.K._Con.../Confectionery/ConfectioneryClientApp/Program.cs

32 lines
723 B
C#
Raw Normal View History

2024-05-08 11:57:33 +04:00
using ConfectioneryClientApp;
2024-05-05 03:45:20 +04:00
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllersWithViews();
var app = builder.Build();
2024-05-08 11:57:33 +04:00
APIClient.Connect(builder.Configuration);
2024-05-05 03:45:20 +04:00
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Home/Error");
2024-05-08 11:57:33 +04:00
// The default HSTS value is 30 days. You may want to change
// this for production scenarios, see https://aka.ms/aspnetcore-hsts.
2024-05-05 03:45:20 +04:00
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
app.Run();