diff options
author | pommicket <pommicket@gmail.com> | 2024-09-11 14:15:20 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2024-09-11 14:15:20 -0400 |
commit | 7c91b96395e325af144e571fe4d28615a75d2c8f (patch) | |
tree | 6e8249ca7e9908dfaa4cee92305d9334212768c7 /server/src/main.rs | |
parent | 4121752a286d339dd5d7f2be1d1479ac5f28bb45 (diff) |
prepare for release
Diffstat (limited to 'server/src/main.rs')
-rw-r--r-- | server/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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; } }; |