TheShopCritics2/TSC2/Program.cs

33 lines
932 B
C#
Raw Normal View History

2024-05-09 17:54:34 +00:00
using TSC2.Components;
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
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.
if (!app.Environment.IsDevelopment())
2024-05-09 17:54:34 +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>()
.AddInteractiveServerRenderMode();
2024-05-09 17:54:34 +00:00
app.Run();