Move server stuff into API folder

This commit is contained in:
Michael Mikovsky
2025-11-29 14:10:05 -07:00
parent a10bdce38f
commit c83e2f1527
8 changed files with 42 additions and 41 deletions
+2 -12
View File
@@ -2,21 +2,11 @@ use axum;
use tokio::net::TcpListener;
use unshell_lib::info;
use unshell_server::app;
use unshell_server::start_api;
#[tokio::main]
async fn main() {
unshell_lib::logger::PrettyLogger::init();
let listener = TcpListener::bind("127.0.0.1:3000")
.await
.expect("Unable to start listener");
info!("Listening on {}", listener.local_addr().unwrap());
let app = app::app().await;
axum::serve(listener, app)
.await
.expect("Error serving application");
start_api("localhost:3000").await;
}