summaryrefslogtreecommitdiffstats
path: root/rust/fatcat-openapi/examples/server/main.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-02-02 11:42:43 -0800
committerBryan Newbold <bnewbold@archive.org>2021-02-02 11:42:43 -0800
commitb8991aed0f4c9f58daad1865a3873fc31bdc96bd (patch)
tree9b1a669f192fdddc419ac06a6632a46e690a5cc8 /rust/fatcat-openapi/examples/server/main.rs
parent119835ea0cf68f0003299cb3e285ae7d8d744af4 (diff)
downloadfatcat-cli-b8991aed0f4c9f58daad1865a3873fc31bdc96bd.tar.gz
fatcat-cli-b8991aed0f4c9f58daad1865a3873fc31bdc96bd.zip
re-codegen openapi stuff
Diffstat (limited to 'rust/fatcat-openapi/examples/server/main.rs')
-rw-r--r--rust/fatcat-openapi/examples/server/main.rs5
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;
}