now displaying the set port when serving
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -790,7 +790,7 @@ checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
|
||||
|
||||
[[package]]
|
||||
name = "docki"
|
||||
version = "0.3.0"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"clap 4.1.8",
|
||||
|
||||
@@ -22,7 +22,12 @@ async fn watch_and_build() {
|
||||
}
|
||||
|
||||
async fn start_server(port: Option<u16>) {
|
||||
println!("\nServing at {} ", "http://localhost:8080".bold());
|
||||
let unwrapped_port = port.unwrap_or(8080);
|
||||
println!(
|
||||
"\nServing at {}{} ",
|
||||
"http://localhost:".bold(),
|
||||
unwrapped_port.to_string().bold()
|
||||
);
|
||||
|
||||
let Ok(()) = listen("localhost", port.unwrap_or(8080), "./dist").await else {
|
||||
panic!("could not start server")
|
||||
|
||||
Reference in New Issue
Block a user