Skip to content

Commit

Permalink
fix quickstart example
Browse files Browse the repository at this point in the history
  • Loading branch information
DrRac27 committed Nov 14, 2023
1 parent a2e8b98 commit 8033985
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions poem-openapi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,17 @@
//! }
//! }
//!
//! let api_service =
//! OpenApiService::new(Api, "Hello World", "1.0").server("http://localhost:3000");
//! let ui = api_service.swagger_ui();
//! let app = Route::new().nest("/", api_service).nest("/docs", ui);
//!
//! # tokio::runtime::Runtime::new().unwrap().block_on(async {
//! Server::new(TcpListener::bind("127.0.0.1:3000"))
//! .run(app)
//! .await;
//! # });
//! #[tokio::main]
//! async fn main() {
//! let api_service =
//! OpenApiService::new(Api, "Hello World", "1.0").server("http://localhost:3000");
//! let ui = api_service.swagger_ui();
//! let app = Route::new().nest("/", api_service).nest("/docs", ui);
//!
//! Server::new(TcpListener::bind("127.0.0.1:3000"))
//! .run(app)
//! .await;
//! }
//! ```
//!
//! ## Check it
Expand Down

0 comments on commit 8033985

Please sign in to comment.