use clap::Parser;
#[must_use]
#[non_exhaustive]
#[derive(Parser, Debug, Clone)]
#[command(version, about = "DocSpec HTTP API server (markdown → BlockNote JSON)")]
pub struct Args {
#[arg(long, default_value = "127.0.0.1")]
pub host: String,
#[arg(long, default_value_t = 3000)]
pub port: u16,
}
impl Args {
#[inline]
#[must_use]
pub fn into_config(self) -> crate::server::ServerConfig {
crate::server::ServerConfig::new(self.host, self.port)
}
#[inline]
pub fn new(host: String, port: u16) -> Self {
Self { host, port }
}
}