From 14f2edbc5948cb828e85ecd23515e180aa4b6f06 Mon Sep 17 00:00:00 2001 From: Lucas Schumacher Date: Sun, 8 Oct 2023 12:51:42 -0400 Subject: [PATCH] first commit --- .gitignore | 1 + Cargo.toml | 9 +++++++++ src/main.rs | 12 ++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 src/main.rs 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]) +}