If you want to avoid the tedious task of re-running the cargo run
for every change you make you can install cargo-watch then use it with run as the cargo command, like the following
cargo watch -x run # -x run means cargo will run cargo run on every change
- Create a new function with the get directive set to your route name
#[get("/my_route")]
fn my_route() -> &'static str {
"1"
}
- Add this new function into the routes array
rocket::ignite().mount("/", routes![hello, my_route]).launch();