29 lines
699 B
C#
29 lines
699 B
C#
using ComputerShopGuarantorApp;
|
|
|
|
var Builder = WebApplication.CreateBuilder(args);
|
|
|
|
// Add services to the container.
|
|
Builder.Services.AddControllersWithViews();
|
|
|
|
var App = Builder.Build();
|
|
ApiUser.Connect(Builder.Configuration);
|
|
|
|
// 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?}");
|
|
|
|
App.Run();
|