44 releases

new 0.0.52 May 7, 2025
0.0.50 Mar 24, 2025
0.0.39 Nov 25, 2024
0.0.20 Jul 25, 2024
0.0.13 Mar 28, 2024

#581 in HTTP server

Download history 15/week @ 2025-01-15 111/week @ 2025-01-22 197/week @ 2025-01-29 250/week @ 2025-02-05 101/week @ 2025-02-12 199/week @ 2025-02-19 257/week @ 2025-02-26 8/week @ 2025-03-05 21/week @ 2025-03-12 112/week @ 2025-03-19 42/week @ 2025-03-26 21/week @ 2025-04-02 169/week @ 2025-04-09 16/week @ 2025-04-16 2/week @ 2025-04-23 8/week @ 2025-04-30

206 downloads per month
Used in qm

MIT license

32KB
464 lines

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}

Dependencies

~24–38MB
~694K SLoC