How can i change the port running rocket? The default port is 8000 but it's already busy in my laptop, i wish to change. My Cargo.toml :
[package]
name = "hello_world"
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.3"
And my main.rs is:
#[macro_use]
extern crate rocket;
#[get("/<name>/<age>")]
fn hello(name: &str, age: u8) -> String {
format!("Hello, {} year old named {}!", age, name)
}
#[launch]
fn rocket() -> _ {
rocket::build().mount("/hello", routes![hello])
}
And i'm getting this error:
Error: Rocket failed to bind network socket to given address/port.