Added rocket

This commit is contained in:
BurnyLlama 2022-11-05 19:36:31 +01:00
parent c45a1e2a02
commit f5c3065c5a
2 changed files with 11 additions and 2 deletions

View File

@ -6,3 +6,4 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
rocket = "0.5.0-rc.2"

View File

@ -1,3 +1,11 @@
fn main() { #[macro_use] extern crate rocket;
println!("Hello, world!");
#[get("/")]
fn index() -> &'static str {
"Hello, world!"
} }
#[launch]
fn rocket() -> _ {
rocket::build().mount("/", routes![index])
}