diff --git a/src/main.rs b/src/main.rs index 5b2009a..582bd8c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,9 +46,8 @@ async fn main() { .route("/", get(root)) .route("/users/:user_id/rss", get(user_rss)) .with_state(nostress_config) - .layer( - service_conventions::tracing_http::trace_layer(Level::INFO) - ); + .layer(service_conventions::tracing_http::trace_layer(Level::INFO)) + .route("/_health", get(health)); // run our app with hyper // `axum::Server` is a re-export of `hyper::Server` @@ -63,6 +62,10 @@ async fn root() -> &'static str { "Hello, World!" } +async fn health() -> Response { + "OK".into_response() +} + #[derive(Debug, Deserialize)] struct TextNoteFilters { include_text_note_replies: Option,