TheShopCritics2/TSC2/Program.cs

34 lines
988 B
C#
Raw Permalink 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();
builder.Services.AddControllers();
2024-05-09 17:54:34 +00:00
builder.Services.AddTelerikBlazor();
var app = builder.Build();
app.MapControllers();
2024-05-09 17:54:34 +00:00
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();