Added rocket
This commit is contained in:
parent
c45a1e2a02
commit
f5c3065c5a
|
@ -6,3 +6,4 @@ edition = "2021"
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
rocket = "0.5.0-rc.2"
|
12
src/main.rs
12
src/main.rs
|
@ -1,3 +1,11 @@
|
||||||
fn main() {
|
#[macro_use] extern crate rocket;
|
||||||
println!("Hello, world!");
|
|
||||||
|
#[get("/")]
|
||||||
|
fn index() -> &'static str {
|
||||||
|
"Hello, world!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[launch]
|
||||||
|
fn rocket() -> _ {
|
||||||
|
rocket::build().mount("/", routes![index])
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user