Function initialize_configuration

Source
pub fn initialize_configuration() -> Configuration
Expand description

It loads the application configuration from the environment.

There are two methods to inject the configuration:

  1. By using a config file: tracker.toml.
  2. Environment variable: TORRUST_TRACKER_CONFIG_TOML. The variable contains the same contents as the tracker.toml file.

Environment variable has priority over the config file.

Refer to the configuration documentation for the configuration options.

§Panics

Will panic if it can’t load the configuration from either ./tracker.toml file or the env var TORRUST_TRACKER_CONFIG_TOML.