Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions EssentialCSharp.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,11 @@ await McpJsonRpcResponseWriter.WriteErrorAsync(

app.MapFallbackToController("Index", "Home");

// Construct content-backed singletons now so an unreadable content file fails startup (the new
// revision never takes traffic) instead of surfacing as a 500 on the first page request.
app.Services.GetRequiredService<ChapterDescriptionService>();
app.Services.GetRequiredService<IGuidelinesService>();

// Validate sitemap data at startup — logs errors but allows startup to continue
var siteMappingService = app.Services.GetRequiredService<ISiteMappingService>();
var logger = app.Services.GetRequiredService<ILogger<Program>>();
Expand Down
Loading