Expand description
Server configuration and utilities.
This crate provides server configuration and GraphQL handler utilities for building microservices with Axum and async-graphql.
§Features
- GraphQL Handler: Axum handler for async-graphql with auth injection
- Server Config: Environment-based server configuration
- Auth Integration: Automatic auth header processing
§Usage
```ignore use qm_server::{graphql_handler, ServerConfig};
#[tokio::main] async fn main() -> anyhow::Result<()> { let config = ServerConfig::new()?; // Build and run Axum server with graphql_handler Ok(()) } ```
§Environment Variables
| Variable | Description | Default |
|---|---|---|
SERVER_HOST | Server host | 127.0.0.1 |
SERVER_PORT | Server port | 3000 |
SERVER_APP_NAME | Application name | quick-microservice |
Structs§
- Server
Config - Server configuration loaded from environment variables.
Functions§
- graphql_
handler - GraphQL request handler for Axum.