mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-28 00:00:20 +02:00
@@ -21,7 +21,10 @@ async fn main() {
|
||||
// run it with hyper
|
||||
let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
|
||||
tracing::debug!("listening on {}", addr);
|
||||
app.serve(&addr).await.unwrap();
|
||||
hyper::Server::bind(&addr)
|
||||
.serve(app.into_make_service())
|
||||
.await
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
type ConnectionPool = Pool<PostgresConnectionManager<NoTls>>;
|
||||
|
||||
Reference in New Issue
Block a user