pub async fn initialize_server_state() -> Result<ServerState, ServerError>Expand description
Constructs the shared ServerState.
- Loads
DATABASE_URLfrom environment - Creates and migrates the PostgreSQL pool
- Sets up the CQRS framework with
GameQueryread model - Starts the database change broadcaster
Panics if the database URL is missing or migrations fail.