Quick Microservices Server - qm-server
helper to configure a simple HTTP server
GitHub repository ⏺ Cargo package ⏺ Docs
Description
With this crate it is easy to get a server configuration with the most common server settings.
Usage
let server_config = 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 = builder.with_prefix.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} |