From 2bb467898ec757e548523eab453188d79a0a6651 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Fri, 7 Oct 2022 14:07:51 +0800 Subject: [PATCH] feat: update hatter test --- __shuttle/hatter-test/src/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/__shuttle/hatter-test/src/lib.rs b/__shuttle/hatter-test/src/lib.rs index b6b2d6d..0692e3e 100644 --- a/__shuttle/hatter-test/src/lib.rs +++ b/__shuttle/hatter-test/src/lib.rs @@ -1,14 +1,18 @@ use axum::{routing::get, Router}; use sync_wrapper::SyncWrapper; +async fn root() -> &'static str { + "root" +} + async fn hello_world() -> &'static str { "Hello, world!" } #[shuttle_service::main] async fn axum() -> shuttle_service::ShuttleAxum { - let router = Router::new().route("/hello", get(hello_world)); + let router = Router::new().route("/", get(root)).route("/hello", get(hello_world)); let sync_wrapper = SyncWrapper::new(router); Ok(sync_wrapper) -} \ No newline at end of file +}