Understand the `config` crate and the `Config` struct
mainThe config crate manages application configuration at runtime. It uses the Config struct to hold all configuration values, which are parsed from a hierarchy of TOML files and environment variables using the figment crate.
By default, the Config struct includes server and database configurations. You can extend it by adding your own fields to the struct. If your project does not use a database, the database field can be omitted.
#[derive(Deserialize, Clone, Debug)]
pub struct Config {
pub server: ServerConfig,
pub database: DatabaseConfig, // The database configuration only exists for projects that use a database
// add your config settings here…
}