Client Hub Project
This commit is contained in:
41
ClientHub/Program.cs
Normal file
41
ClientHub/Program.cs
Normal file
@ -0,0 +1,41 @@
|
||||
using OI.Metrology.ClientHub.Data;
|
||||
using OI.Metrology.ClientHub.Models;
|
||||
|
||||
namespace OI.Metrology.ClientHub;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
|
||||
AppSettings appSettings = Models.Binder.AppSettings.Get(builder.Configuration);
|
||||
|
||||
// Add services to the container.
|
||||
_ = builder.Services.AddRazorPages();
|
||||
_ = builder.Services.AddServerSideBlazor();
|
||||
|
||||
_ = builder.Services.AddSingleton(_ => appSettings);
|
||||
_ = builder.Services.AddSingleton<WeatherForecastService>();
|
||||
|
||||
WebApplication app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (!app.Environment.IsDevelopment())
|
||||
{
|
||||
_ = app.UseExceptionHandler("/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.MapBlazorHub();
|
||||
_ = app.MapFallbackToPage("/_Host");
|
||||
|
||||
app.Run();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user