Added webserver and port number specification

This commit is contained in:
Random936
2024-09-22 20:08:41 -07:00
parent 1f7f636219
commit 7ec442c93b
5 changed files with 96 additions and 7 deletions

View File

@@ -12,6 +12,10 @@ fn current_dir_as_string() -> String {
#[derive(Parser, Debug)]
#[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,
/// Interface to print URLs for. Default is all interfaces.
#[arg(short, long, default_value_t = String::from("all"))]
pub interface: String,