From b8991aed0f4c9f58daad1865a3873fc31bdc96bd Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 2 Feb 2021 11:42:43 -0800 Subject: re-codegen openapi stuff --- rust/fatcat-openapi/examples/server/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rust/fatcat-openapi/examples/server/main.rs') diff --git a/rust/fatcat-openapi/examples/server/main.rs b/rust/fatcat-openapi/examples/server/main.rs index af089c2..5488dc6 100644 --- a/rust/fatcat-openapi/examples/server/main.rs +++ b/rust/fatcat-openapi/examples/server/main.rs @@ -8,7 +8,8 @@ mod server; /// Create custom server, wire it to the autogenerated router, /// and pass it to the web server. -fn main() { +#[tokio::main] +async fn main() { env_logger::init(); let matches = App::new("server") @@ -21,5 +22,5 @@ fn main() { let addr = "127.0.0.1:8080"; - hyper::rt::run(server::create(addr, matches.is_present("https"))); + server::create(addr, matches.is_present("https")).await; } -- cgit v1.2.3