Start axum, add tls-check route
This commit is contained in:
parent
6ba03b79be
commit
3f7a1b3e2f
1 changed files with 5 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
mod auth;
|
mod auth;
|
||||||
|
|
||||||
|
use axum::{routing::get, Router};
|
||||||
use color_eyre::Result;
|
use color_eyre::Result;
|
||||||
use tracing::{event, instrument, Level};
|
use tracing::{event, instrument, Level};
|
||||||
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
|
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
|
||||||
|
@ -49,5 +50,9 @@ async fn main() -> Result<()> {
|
||||||
|
|
||||||
event!(Level::INFO, "Hello, world!");
|
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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue