31 lines
713 B
C#
Raw Normal View History

2024-05-14 23:53:59 +04:00
using AutoWorkshopShopApp;
var Builder = WebApplication.CreateBuilder(args);
2024-05-14 23:46:36 +04:00
// Add services to the container.
2024-05-14 23:53:59 +04:00
Builder.Services.AddControllersWithViews();
2024-05-14 23:46:36 +04:00
2024-05-14 23:53:59 +04:00
var App = Builder.Build();
ApiClient.Connect(Builder.Configuration);
2024-05-14 23:46:36 +04:00
// Configure the HTTP request pipeline.
2024-05-14 23:53:59 +04:00
if (!App.Environment.IsDevelopment())
2024-05-14 23:46:36 +04:00
{
2024-05-14 23:53:59 +04:00
App.UseExceptionHandler("/Home/Error");
2024-05-14 23:46:36 +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-14 23:53:59 +04:00
App.UseHsts();
2024-05-14 23:46:36 +04:00
}
2024-05-14 23:53:59 +04:00
App.UseHttpsRedirection();
App.UseStaticFiles();
2024-05-14 23:46:36 +04:00
2024-05-14 23:53:59 +04:00
App.UseRouting();
2024-05-14 23:46:36 +04:00
2024-05-14 23:53:59 +04:00
App.UseAuthorization();
2024-05-14 23:46:36 +04:00
2024-05-14 23:53:59 +04:00
App.MapControllerRoute(
2024-05-14 23:46:36 +04:00
name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}");
2024-05-14 23:53:59 +04:00
App.Run();