now displaying the set port when serving

This commit is contained in:
2023-03-14 22:39:28 +01:00
parent b9f37cfe47
commit c2cbe559a7
2 changed files with 7 additions and 2 deletions

2
Cargo.lock generated
View File

@@ -790,7 +790,7 @@ checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
[[package]]
name = "docki"
version = "0.3.0"
version = "1.0.0"
dependencies = [
"bytes",
"clap 4.1.8",

View File

@@ -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")