commit 14f2edbc5948cb828e85ecd23515e180aa4b6f06 Author: Lucas Schumacher Date: Sun Oct 8 12:51:42 2023 -0400 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..c42d27e --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "hello-rocket" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +rocket = "=0.5.0-rc.3" diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..12cfdcb --- /dev/null +++ b/src/main.rs @@ -0,0 +1,12 @@ +#[macro_use] +extern crate rocket; + +#[get("/")] +fn index() -> &'static str { + "Hello, world!" +} + +#[launch] +fn rocket() -> _ { + rocket::build().mount("/", routes![index]) +}