created readme
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user