This commit is contained in:
Mike Dilger committed 2024-02-17 09:53:47 +13:00
1 parent 859d6e9edf
commit c315ed671f
1 file changed
+5
+5
View File
@@ -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;