diff --git a/src/main.rs b/src/main.rs index e656616..f8fadbb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,6 +13,7 @@ use crate::store::Store; use std::env; use std::fs::OpenOptions; use std::io::Read; +use tokio::net::TcpListener; #[tokio::main] async fn main() -> Result<(), Error> { @@ -37,6 +38,10 @@ async fn main() -> Result<(), Error> { let store = Store::new(&config.data_directory)?; let _ = GLOBALS.store.set(store); + // Bind listener to port + let _listener = TcpListener::bind((&*config.ip_address, config.port)).await?; + log::info!("Running on {}:{}", config.ip_address, config.port); + // Store config into GLOBALS *GLOBALS.config.write().await = config;