installs rocket, hello world endpoint
This commit is contained in:
Generated
+1704
File diff suppressed because it is too large
Load Diff
@@ -4,3 +4,4 @@ version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
rocket = "0.5.1"
|
||||
|
||||
+10
-2
@@ -1,3 +1,11 @@
|
||||
fn main() {
|
||||
println!("Hello, world!");
|
||||
#[macro_use] extern crate rocket;
|
||||
|
||||
#[launch]
|
||||
fn rocket() -> _ {
|
||||
rocket::build().mount("/", routes![index])
|
||||
}
|
||||
|
||||
#[get("/")]
|
||||
fn index() -> &'static str {
|
||||
"Hello, world!"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user