Skip to content

Commit 12cd562

Browse files
committed
no raw unwraps
1 parent 6d74eef commit 12cd562

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/main.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,12 @@ async fn main() {
4343
.route("/echoes", post(echoes::create))
4444
.with_state(pool);
4545

46-
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap();
47-
48-
axum::serve(listener, app).await.unwrap();
46+
// TODO: make configurable via dotenv like in real life
47+
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000")
48+
.await
49+
.expect("failed to bind to 0.0.0.0:3000");
50+
51+
axum::serve(listener, app)
52+
.await
53+
.expect("failed axum::serve...");
4954
}

0 commit comments

Comments
 (0)