35 lines
808 B
C#
35 lines
808 B
C#
using CPRNIMS.Domain.UIServices.Updater;
|
|
using CPRNIMS.WebApps.Common;
|
|
using Microsoft.AspNetCore.Rewrite;
|
|
using Microsoft.Extensions.Options;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
builder.Services.AddApplicationServices(builder);
|
|
|
|
var app = builder.Build();
|
|
|
|
// Configure the HTTP request pipeline.
|
|
if (!app.Environment.IsDevelopment())
|
|
{
|
|
app.UseExceptionHandler("/Home/Error");
|
|
app.UseHsts();
|
|
}
|
|
//app.UseRewriter(options);
|
|
app.UseHttpsRedirection();
|
|
app.UseStaticFiles();
|
|
app.UseCors("AllowAll");
|
|
|
|
app.UseRouting();
|
|
app.UseSession();
|
|
|
|
app.MapHub<CartHub>("/cartHub");
|
|
|
|
app.UseAuthentication();
|
|
app.UseAuthorization();
|
|
|
|
app.MapControllerRoute(
|
|
name: "default",
|
|
//pattern: "{controller=ItemMgmt}/{action=Index}/{id?}");
|
|
pattern: "{controller=Home}/{action=Index}/{id?}");
|
|
app.Run(); |