From 2ba043862faaea5fa4dfab92084f4b64f2065f60 Mon Sep 17 00:00:00 2001 From: ajuvercr Date: Fri, 13 Nov 2020 10:53:09 +0100 Subject: [PATCH] build and runnable, still no host_name support, but hardcodable --- backend/src/main.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index 5f68259..39f3dd3 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -86,12 +86,6 @@ fn get_colour(value: &Value, _: &HashMap) -> tera::Result )); } -#[async_std::main] -async fn main(){ - let rocket = rocket().await; - rocket.launch().await.expect("ROCKET CRASHED"); -} - fn get_host_name(host_name: &str) -> impl Fn(&HashMap) -> tera::Result + Sync + Send { let host_name = host_name.to_string(); @@ -99,6 +93,7 @@ fn get_host_name(host_name: &str) -> impl Fn(&HashMap) -> tera::R } /// Async main function, starting logger, graph and rocket +#[rocket::launch] async fn rocket() -> rocket::Rocket { let fut = graph::set_default();