Start axum, add tls-check route

This commit is contained in:
Xiretza 2024-02-10 10:04:10 +00:00
parent 6ba03b79be
commit 3f7a1b3e2f

View file

@ -21,6 +21,7 @@
mod auth;
use axum::{routing::get, Router};
use color_eyre::Result;
use tracing::{event, instrument, Level};
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
@ -49,5 +50,9 @@ async fn main() -> Result<()> {
event!(Level::INFO, "Hello, world!");
let app = Router::new().route("/tls-check/success", get(|| async { "OK" }));
let listener = tokio::net::TcpListener::bind("[::]:8080").await?;
axum::serve(listener, app).await?;
Ok(())
}