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