diff --git a/Cargo.toml b/Cargo.toml index 834eea1..35f2709 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,3 +4,4 @@ version = "0.1.0" edition = "2021" [dependencies] +rocket = "0.5.0" diff --git a/src/main.rs b/src/main.rs index e7a11a9..aa992e4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,13 @@ -fn main() { - println!("Hello, world!"); +#[macro_use] +extern crate rocket; + +#[get("/")] +fn index() -> &'static str { + "Hello, world!" } + +#[launch] +fn rocket() -> _ { + rocket::build().mount("/", routes![index]) +} +