From 7c91b96395e325af144e571fe4d28615a75d2c8f Mon Sep 17 00:00:00 2001 From: pommicket Date: Wed, 11 Sep 2024 14:15:20 -0400 Subject: prepare for release --- server/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/src') diff --git a/server/src/main.rs b/server/src/main.rs index c019a2a..e5c9848 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -13,6 +13,7 @@ use tokio::io::AsyncWriteExt; use tokio::sync::{Mutex, RwLock}; use tungstenite::protocol::Message; +const PORT: u16 = 54472; const PUZZLE_ID_CHARSET: &[u8] = b"23456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"; const PUZZLE_ID_LEN: usize = 7; const MAX_PLAYERS: u32 = 20; @@ -524,12 +525,11 @@ async fn create_table_if_doesnt_exist(database: &tokio_postgres::Client) -> Resu #[tokio::main] async fn main() { - let port = 54472; - let host_addr = SocketAddr::from(([127, 0, 0, 1], port)); + let host_addr = SocketAddr::from(([127, 0, 0, 1], PORT)); let listener = match tokio::net::TcpListener::bind(host_addr).await { Ok(l) => l, Err(e) => { - eprintln!("Couldn't bind to localhost:{port}: {e}"); + eprintln!("Couldn't bind to localhost:{PORT}: {e}"); return; } }; -- cgit v1.2.3