use std::path::PathBuf; use clap::Parser; #[derive(Parser, Debug)] #[command( name = "filebrowser-ng", about = "A simple, noob-friendly web file browser", version )] pub struct Cli { /// Root folder the server has access to (required). /// All user folders and shares are relative to this. #[arg(long)] pub root: PathBuf, /// Path to the SQLite database file (required). #[arg(long)] pub db: PathBuf, /// Port to listen on. #[arg(long, default_value_t = 8080)] pub port: u16, /// Address to bind. Use 0.0.0.0 to expose beyond localhost. #[arg(long, default_value = "127.0.0.1")] pub bind: String, /// Assume the server runs behind a TLS-terminating reverse proxy /// (sets the `Secure` attribute on the session cookie). #[arg(long)] pub https: bool, }