2024-05-09 17:54:34 +00:00
|
|
|
using TSC2.Components;
|
|
|
|
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
|
|
|
|
// Add services to the container.
|
2024-07-31 11:25:16 +00:00
|
|
|
builder.Services.AddRazorComponents(options => options.DetailedErrors = builder.Environment.IsDevelopment()).AddInteractiveServerComponents();
|
2024-05-09 17:54:34 +00:00
|
|
|
|
|
|
|
builder.Services.AddTelerikBlazor();
|
|
|
|
|
|
|
|
var app = builder.Build();
|
|
|
|
|
2024-08-05 17:13:29 +00:00
|
|
|
// Note secrets for login auth
|
|
|
|
var GoogleClientId = builder.Configuration["Authentication:Google:ClientId"];
|
|
|
|
var GoogleClientSecret = builder.Configuration["Authentication:Google:ClientSecret"];
|
|
|
|
|
2024-05-09 17:54:34 +00:00
|
|
|
// Configure the HTTP request pipeline.
|
2024-07-31 11:25:16 +00:00
|
|
|
if (!app.Environment.IsDevelopment())
|
2024-05-09 17:54:34 +00:00
|
|
|
{
|
2024-07-31 11:25:16 +00:00
|
|
|
app.UseExceptionHandler("/Error");
|
2024-05-09 17:54:34 +00:00
|
|
|
// 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.UseAntiforgery();
|
|
|
|
|
|
|
|
app.MapRazorComponents<App>()
|
2024-07-31 11:25:16 +00:00
|
|
|
.AddInteractiveServerRenderMode();
|
2024-05-09 17:54:34 +00:00
|
|
|
|
2024-07-31 11:25:16 +00:00
|
|
|
app.Run();
|