Added config parsing in config.rs

This commit is contained in:
Random936
2024-12-22 18:47:37 -08:00
parent 23102ce070
commit adda5dd958
5 changed files with 355 additions and 17 deletions

View File

@@ -13,8 +13,8 @@ fn current_dir_as_string() -> String {
#[command(version, about, long_about = None)]
pub struct Args {
/// Port for the web server to listen on.
#[arg(short, long, default_value_t = 8000)]
pub port: u16,
#[arg(short, long)]
pub port: Option<u16>,
/// Interface to print URLs for. Default is all interfaces.
#[arg(short, long, default_value_t = String::from("all"))]