31 lines
729 B
C#
31 lines
729 B
C#
using CPRNIMS.Domain.UIServices.Updater;
|
|
using CPRNIMS.WebApps.Common;
|
|
using Microsoft.AspNetCore.StaticFiles;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
builder.WebHost.UseStaticWebAssets();
|
|
|
|
builder.Services.AddApplicationServices(builder);
|
|
builder.Services.AddFastReport();
|
|
|
|
var app = builder.Build();
|
|
|
|
if (!app.Environment.IsDevelopment())
|
|
{
|
|
app.UseExceptionHandler("/Home/Error");
|
|
app.UseHsts();
|
|
}
|
|
|
|
app.UseHttpsRedirection();
|
|
app.UseStaticFiles();
|
|
app.UseRouting();
|
|
app.UseSession();
|
|
app.UseAuthentication();
|
|
app.UseAuthorization();
|
|
app.UseFastReport();
|
|
app.MapHub<CartHub>("/cartHub");
|
|
app.MapControllerRoute(
|
|
name: "default",
|
|
pattern: "{controller=Home}/{action=Index}/{id?}");
|
|
app.Run(); |