created readme

This commit is contained in:
2026-02-26 09:28:25 +01:00
parent b854e4b633
commit 4c2568b291
3 changed files with 53 additions and 0 deletions

View File

@@ -15,10 +15,13 @@ pub struct Cli {
pub enum Commands {
/// Serve the wiki locally
Serve {
/// Disable the navigation page
#[arg(short, long)]
no_navigation: bool,
/// Network port to use
#[arg(short = 'P', long, default_value = "8090")]
port: u16,
/// Whether to use 0.0.0.0 to serve on the network
#[arg(short = 'H', long)]
host: bool,
},

View File

@@ -115,6 +115,9 @@ async fn main() -> anyhow::Result<()> {
};
let listener = tokio::net::TcpListener::bind(&addr).await?;
tracing::info!("Listening on http://{}", addr);
if no_navigation {
tracing::warn!("no_navigation is enabled: there will be no index at the root")
}
axum::serve(listener, app).await?;
}
Commands::Build {