Skip to main content

Crate qm_server

Crate qm_server 

Source
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

VariableDescriptionDefault
SERVER_HOSTServer host127.0.0.1
SERVER_PORTServer port3000
SERVER_APP_NAMEApplication namequick-microservice

Structs§

ServerConfig
Server configuration loaded from environment variables.

Functions§

graphql_handler
GraphQL request handler for Axum.