47 releases

new 0.0.55 Jun 12, 2025
0.0.51 Apr 9, 2025
0.0.50 Mar 24, 2025
0.0.39 Nov 25, 2024
0.0.13 Mar 28, 2024

#1054 in HTTP server

Download history 238/week @ 2025-02-23 65/week @ 2025-03-02 13/week @ 2025-03-09 14/week @ 2025-03-16 136/week @ 2025-03-23 20/week @ 2025-03-30 169/week @ 2025-04-06 23/week @ 2025-04-13 9/week @ 2025-04-20 3/week @ 2025-04-27 124/week @ 2025-05-04 121/week @ 2025-05-11 237/week @ 2025-05-18 40/week @ 2025-05-25 4/week @ 2025-06-01 123/week @ 2025-06-08

407 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
~691K SLoC