mirror of
https://github.com/RedWizardsLab/EchoHub.git
synced 2026-09-05 15:46:01 +02:00
docs: Update documentation for 145 files
Generated by AurionDocs
Job ID: 934f8c39-8082-4942-8d17-72ed8f5f8d50
Source commit: 40aea9a
This commit is contained in:
@@ -4,12 +4,4 @@
|
||||
> **Kind:** file
|
||||
|
||||
|
||||
Bootstraps and hosts the EchoHub.Server application as a resilient, self-hosting startup routine. It is the entrypoint that wires configuration, logging, data access, authentication, and service registrations, then starts the ASP.NET Core web host inside a self-healing loop that restarts on startup failures.
|
||||
|
||||
## Remarks
|
||||
Program serves as the composition root of EchoHub.Server. It orchestrates essential cross-cutting concerns—initial configuration via FirstRunSetup, bootstrap logging, server-logs integration with Serilog, data access via EF Core SQLite, and authentication via JWT—by registering the relevant services and options early in the host lifecycle. The self-restarting loop provides resilience during startup and deploy-time hiccups, ensuring the server recovers automatically while debugging and monitoring can observe repeated failures. It ties together the server's operational concerns and acts as the single entry point that other components rely upon to start the web application.
|
||||
|
||||
## Notes
|
||||
- The startup loop restarts the host on failures, enabling resilience but potentially causing rapid churn if issues persist; external monitoring is recommended to detect persistent problems.
|
||||
- Jwt:Secret must be configured; missing configuration leads to startup failure (an InvalidOperationException is thrown during startup).
|
||||
- The app uses SQLite by default (echohub.db) located in AppContext.BaseDirectory; ensure filesystem permissions and migrations are properly managed in deployment.
|
||||
Program.cs is the entry point for the EchoHub.Server application. It bootstraps the server by performing the one-time setup via `FirstRunSetup.EnsureAppSettings()`, configuring the bootstrap logger, and then starting the ASP.NET Core host via `WebApplication.CreateBuilder(args)` inside an auto-restart loop. It wires core infrastructure such as [`EchoHubDbContext`](Data/EchoHubDbContext.cs.md) for EF Core and authentication, and server features like [`ServerLogsOptions`](Config/ServerLogsOptions.cs.md)/[`ServerLogsService`](Services/ServerLogs/ServerLogsService.cs.md), enabling the app to recover from startup failures by rebuilding and running the web host repeatedly.
|
||||
Reference in New Issue
Block a user