Expand description
Util types and functions to quickly and easy set up an HTTP server from environment variables.
See Config::init()
for examples.
Modules§
- db
- The
DbConfig
struct represents settings used to establish a connection with a database. - env
- The
Environment
enum represents possible deployment environments for an application. - server
- The
HttpServerConfig
struct represents configuration for an HTTP server.
Structs§
- Config
Config
is responsible of the configuration of a “full” server, reading the settings from environment variables: the deployment environment, the HTTP server settings and database settings.
Functions§
- env_
bool - Read boolean environment variable, accepting “0” or “false” as false values, and “1” or “true” values as true.
- env_
parsable - Get a parsable value from an env value like a number,
otherwise return
default_value
.