From daa46ffe7950f29c72bbc08b2b7aad68a68f4474 Mon Sep 17 00:00:00 2001 From: emma Date: Tue, 27 Jun 2023 20:55:44 -0600 Subject: [PATCH] closes #3 --- src/server.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/server.rs b/src/server.rs index be236cf..01bb75c 100644 --- a/src/server.rs +++ b/src/server.rs @@ -25,10 +25,12 @@ use std::{ use liminality::handle_client; +const DEFAULT_PORT: &str = "3123"; + fn main() { - let listener = TcpListener::bind("0.0.0.0:8080") - .expect("Failed to bind to port 8080."); - println!("Server listening on port 8080."); + let listener = TcpListener::bind(format!("0.0.0.0:{}", DEFAULT_PORT)) + .expect(&format!("Failed to bind to port {}.", DEFAULT_PORT)); + println!("Server listening on port {}.", DEFAULT_PORT); let connections: Arc>> = Arc::new( Mutex::new(HashMap::new())