add ServerConfig with env variables

This commit is contained in:
2025-06-16 18:03:42 +02:00
parent 0c619fbc94
commit 10837dac35
5 changed files with 138 additions and 4 deletions

10
src/config.rs Normal file
View File

@@ -0,0 +1,10 @@
use bon::Builder;
#[derive(Debug, Builder)]
pub struct ServerConfig {
#[builder(default = String::from("0.0.0.0"))]
pub host: String,
#[builder(default = 6171)]
pub port: u16,
pub max_connections: Option<usize>,
}