diff options
Diffstat (limited to 'rust/fatcat-openapi/examples/server/main.rs')
-rw-r--r-- | rust/fatcat-openapi/examples/server/main.rs | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |