PIbd-21_Ievlewa_SUBD/TaskTracker/ClientApp/Program.cs

32 lines
704 B
C#
Raw Permalink Normal View History

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