35 lines
844 B
C#
35 lines
844 B
C#
using ECM.JobRunner.Web;
|
|
using ECM.JobRunner.Web.Data;
|
|
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.AspNetCore.Components.Web;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
// Add services to the container.
|
|
builder.Services.AddRazorPages();
|
|
builder.Services.AddServerSideBlazor();
|
|
builder.Services.AddTransient<LoggingService>();
|
|
builder.Services.AddTransient<DatabaseService>();
|
|
builder.Services.AddSingleton<WcfService>();
|
|
builder.Services.AddTransient<DashboardService>();
|
|
builder.Services.AddTransient<JobService>();
|
|
builder.Services.AddTransient<ImportService>();
|
|
|
|
var app = builder.Build();
|
|
|
|
// Configure the HTTP request pipeline.
|
|
if (!app.Environment.IsDevelopment())
|
|
{
|
|
app.UseExceptionHandler("/Error");
|
|
}
|
|
|
|
|
|
app.UseStaticFiles();
|
|
|
|
app.UseRouting();
|
|
|
|
app.MapBlazorHub();
|
|
app.MapFallbackToPage("/_Host");
|
|
|
|
app.Run();
|