Skip to content

Commit

Permalink
update raedme
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtbuilds committed Feb 11, 2024
1 parent 142c8b7 commit 1169942
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ async fn main() {

```rust
// axum example
use oasgen::{OaSchema, Server, openapi};
use axum::Json;
use oasgen::{OaSchema, Server, oasgen};
use axum::{Json, routing};
use serde::{Deserialize, Serialize};

#[derive(OaSchema, Deserialize)]
Expand Down Expand Up @@ -99,13 +99,23 @@ async fn main() {
.route("/healthcheck", routing::get(|| async { "OK" }))
.merge(server.into_router());

axum::Server::bind("0.0.0.0:5000".parse().unwrap())
axum::Server::bind(&"0.0.0.0:5000".parse().unwrap())
.serve(router.into_make_service())
.await
.unwrap();
}
```

To compile the axum example, use the following dependencies:

```toml
[dependencies]
axum = "0.6"
oasgen = { version = "0.19.0", features = ["axum"] }
serde = { version = "1.0.196", features = ["derive"] }
tokio = { version = "1.36.0", features = ["full"] }
```

# Installation

```toml
Expand Down

0 comments on commit 1169942

Please sign in to comment.