From bc26955ae4736c07627c4c27b769639ab216aa8e Mon Sep 17 00:00:00 2001 From: BurnyLlama Date: Mon, 6 Dec 2021 19:53:37 +0100 Subject: [PATCH] Boilerplats --- .gitignore | 5 +++++ Cargo.toml | 9 +++++++++ src/main.rs | 11 +++++++++++ 3 files changed, 25 insertions(+) create mode 100644 Cargo.toml create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore index 8ffd9f4..d1bb021 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,8 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk + + +# Added by cargo + +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..787a097 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "school_labs" +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.1" diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..f090233 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,11 @@ +#[macro_use] extern crate rocket; + +#[get("/")] +fn index() -> &'static str { + "Hello, world!" +} + +#[launch] +fn rocket() -> _ { + rocket::build().mount("/", routes![index]) +} \ No newline at end of file