mirror of
https://github.com/Djeeberjr/fw-anwesenheit.git
synced 2026-05-03 03:31:56 +00:00
Switched to tokio and added webserver
This commit is contained in:
11
src/webserver.rs
Normal file
11
src/webserver.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
use rocket::{get, routes};
|
||||
|
||||
pub async fn start_webserver() -> Result<(), rocket::Error> {
|
||||
rocket::build().mount("/", routes![index]).launch().await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[get("/")]
|
||||
fn index() -> &'static str {
|
||||
"Hello, world!"
|
||||
}
|
||||
Reference in New Issue
Block a user