diff options
| author | Naz <ndpm13@ch-naseem.com> | 2025-10-11 14:44:12 +0100 |
|---|---|---|
| committer | Naz <ndpm13@ch-naseem.com> | 2025-10-12 09:54:00 +0100 |
| commit | bbce03f95d82d5373f2b6a1c28b03eb25d7bb94c (patch) | |
| tree | 7439ed8038bbb9a08a6b56fbfb90e8bea4b9f2ea /src/lib.rs | |
| parent | 50cf5960cb1f0af831e28eb08b15b97794287f87 (diff) | |
✨feat: add flags to override values in config file
Diffstat (limited to 'src/lib.rs')
| -rw-r--r-- | src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -27,10 +27,10 @@ pub fn app(config: Config) -> Router { pub async fn run() -> Result<()> { let args = Cli::parse(); - let config = config::Config::new()?; - match args.command { - Command::Serv => { + Command::Serv(args) => { + let config = config::Config::new(args)?; + let socket = SocketAddr::new(IpAddr::V6(Ipv6Addr::UNSPECIFIED), config.port); let listener = TcpListener::bind(socket).await?; |
