qm-server

Crates.ioqm-server
lib.rsqm-server
version0.0.60
created_at2024-03-14 12:32:58.999656+00
updated_at2025-08-11 12:17:29.774864+00
descriptionServer helper functions
homepage
repositoryhttps://github.com/hd-gmbh-dev/quick-microservice-rs
max_upload_size
id1173345
size58,848
(hd-gmbh-bot)

documentation

README

Quick Microservices Server - qm-server

helper to configure a simple HTTP server


GitHub repositoryCargo packageDocs

github.com - quick-microservice-rs crates.io - qm-server
github.com - workflow - build


Description

With this crate it is easy to get a server configuration with the most common server settings.

Usage

let server_config = qm::server::ServerConfig::new()?;

The Config is populated with environment variables. By default, all variables with the prefix SERVER_ are considered.

The prefix can be changed by using a builder pattern.

let example_config = qm::server::ServerConfig::builder().with_prefix("EXAMPLE_").build()?;

Variables and Defaults

These variables are available and are set with the following defaults.

variable struct field default
SERVER_APP_NAME app_name "quick-microservice"
SERVER_HOST host "127.0.0.1"
SERVER_PORT port 3000
address {host}:{port}
Commit count: 224

cargo fmt