| Crates.io | qm-server |
| lib.rs | qm-server |
| version | 0.0.62 |
| created_at | 2024-03-14 12:32:58.999656+00 |
| updated_at | 2025-09-17 18:42:55.109086+00 |
| description | Server helper functions |
| homepage | |
| repository | https://github.com/hd-gmbh-dev/quick-microservice-rs |
| max_upload_size | |
| id | 1173345 |
| size | 57,660 |
qm-serverhelper to configure a simple HTTP server
With this crate it is easy to get a server configuration with the most common server settings.
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()?;
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} |