diff options
author | rtkay123 <dev@kanjala.com> | 2025-07-12 13:46:33 +0200 |
---|---|---|
committer | rtkay123 <dev@kanjala.com> | 2025-07-12 13:46:33 +0200 |
commit | ba14505f39d8634921f260d715aa8e66f2a14406 (patch) | |
tree | e8d2cc267302d4036c42bb16b77029c6a6799f9d /src/main.rs | |
parent | 1dc7dccb7536f6831de570f535e6911384e1a7e4 (diff) | |
download | sellershut-ba14505f39d8634921f260d715aa8e66f2a14406.tar.bz2 sellershut-ba14505f39d8634921f260d715aa8e66f2a14406.zip |
feat: start server
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index e7a11a9..9a73196 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,18 @@ -fn main() { - println!("Hello, world!"); +mod error; +mod server; +mod state; + +use stack_up::{Monitoring, tracing::Tracing}; + +use crate::error::AppError; + +#[tokio::main] +async fn main() -> Result<(), AppError> { + let _tracing = Tracing::builder().build(&Monitoring { + log_level: "trace".into(), + }); + let listener = tokio::net::TcpListener::bind("127.0.0.1:3000").await?; + tracing::debug!("listening on {}", listener.local_addr()?); + axum::serve(listener, server::router()).await?; + Ok(()) } |