diff --git a/README.md b/README.md index 455e156..677b549 100644 --- a/README.md +++ b/README.md @@ -7,5 +7,5 @@ There is also a Map: { + listen = args.next().unwrap(); + } + unknown => { + println!("unknown option: {}", unknown); + std::process::exit(1) + } + } + } + let app = Router::new() .route("/", get(route_index)) .route("/metrics", get(route_metrics)); - let listener = tokio::net::TcpListener::bind("[::]:3000").await.unwrap(); + let listener = tokio::net::TcpListener::bind(listen).await.unwrap(); println!("Server listening on: http://{}", listener.local_addr().unwrap()); axum::serve(listener, app).await.unwrap();