Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #163 from philipcristiano/healthcheck
Browse files Browse the repository at this point in the history
fix: Add healthcheck
  • Loading branch information
philipcristiano authored Jul 12, 2024
2 parents 2a3d938 + 21ef243 commit dfa7501
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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<bool>,
Expand Down

0 comments on commit dfa7501

Please sign in to comment.