PIbd-21_Danilov_V.V._Course.../VeterinaryClinic/VeterinaryClinicWebApp/Program.cs

28 lines
643 B
C#
Raw Normal View History

2024-04-30 12:46:36 +04:00
var builder = WebApplication.CreateBuilder(args);
2024-05-01 03:06:53 +04:00
// Add services to the container.
builder.Services.AddControllersWithViews();
2024-04-30 12:46:36 +04:00
var app = builder.Build();
2024-05-01 03:06:53 +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();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.MapControllerRoute(
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
2024-04-30 12:46:36 +04:00
app.Run();