summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs19
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(())
}