added functionality and file structure

This commit is contained in:
Arlo Filley 2022-09-29 10:24:20 +01:00
parent 756d77a1d8
commit dd91be366b

View File

@ -1,7 +1,13 @@
#[macro_use] extern crate rocket; #[macro_use] extern crate rocket;
use rocket::{Rocket, Build}; use rocket::{Rocket, Build};
#[get("/")]
fn index() -> String {
format!("Hello world")
}
#[launch] #[launch]
fn rocket() -> Rocket<Build> { fn rocket() -> Rocket<Build> {
rocket::build() rocket::build()
.mount("/", routes![index])
} }