factoriauth/src/server.rs

13 lines
337 B
Rust
Raw Normal View History

2024-02-10 11:13:11 +01:00
use axum::{routing::get, Router};
use color_eyre::Result;
use tracing::instrument;
#[instrument]
pub async fn run() -> Result<()> {
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(())
}