summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorunitexe <unitexe70@gmail.com>2026-01-27 23:39:15 -0600
committerunitexe <unitexe70@gmail.com>2026-01-27 23:39:35 -0600
commitcdac69878b058dcd1a150d768e2627d41af211c2 (patch)
tree91c2e84728c9e08cb5d0a787e1688e9d4c1bde83 /src/main.rs
Initial commit
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..69b2841
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,25 @@
+use axum::{Router, routing::get};
+
+const BANNER: &str = r#"
+ ###### ###### ######
+ ## ## ## ## ## ##
+ ## ## ##
+ ## ## ##
+ ## ## ##
+ ## ## ## ## ## ##
+ ###### ###### ######
+
+"#;
+
+#[tokio::main]
+async fn main() {
+ let app = Router::new().route("/", get(|| async { BANNER }));
+ let listener = tokio::net::TcpListener::bind("0.0.0.0:8080").await.unwrap();
+ let server_handle = tokio::spawn(async move { axum::serve(listener, app).await });
+ tokio::time::sleep(tokio::time::Duration::from_millis(100)).await;
+ if !server_handle.is_finished() {
+ let _ = sd_notify::notify(true, &[sd_notify::NotifyState::Ready]);
+ }
+
+ server_handle.await.unwrap().unwrap();
+}