From de3e738445646cae305c7fc4d286997d1310043a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Fri, 3 Oct 2025 17:50:13 +0200 Subject: [PATCH] feat!: add health endpoint --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 649e9ff..bf69737 100644 --- a/src/main.rs +++ b/src/main.rs @@ -118,7 +118,7 @@ async fn main() { tracing_subscriber::fmt::init(); let client = Client::new(); - let path = warp::path!(String) + let rss = warp::path!("rss" / String) .and_then(move |url| { let client = client.clone(); async move { @@ -130,5 +130,6 @@ async fn main() { } }) .map(|reply| warp::reply::with_header(reply, "Content-Type", "application/rss+xml")); - warp::serve(path).run(([0, 0, 0, 0], 3030)).await; + let health = warp::path!("health").map(|| "Healthy"); + warp::serve(rss.or(health)).run(([0, 0, 0, 0], 3030)).await; }