| Crates.io | pepe-config |
| lib.rs | pepe-config |
| version | 0.2.7 |
| created_at | 2022-03-28 13:53:26.90863+00 |
| updated_at | 2025-03-28 08:08:24.130388+00 |
| description | Configuration functions for PepeTeam template application |
| homepage | https://pepe.team |
| repository | https://github.com/crypto-pepe/pepe-rs |
| max_upload_size | |
| id | 557834 |
| size | 31,383 |
use serde::{Deserialize, Serialize};
pub const DEFAULT_CONFIG: &str = include_str!("../config.yaml");
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Config {
pub port: u16,
pub dry_run_mode: bool
}
impl Config {
pub fn load() -> Result<Self, pepe_config::ConfigError> {
pepe_config::load(DEFAULT_CONFIG, pepe_config::FileFormat::Yaml)
}
}
Should be run in 1 thread due to environment variables usage.
cargo test -- --test-threads 1