Skip to content

Commit

Permalink
feat: add /health endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
benluelo committed Sep 28, 2023
1 parent 4accd1f commit 5391930
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion voyager/src/queue/msg_server.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
use axum::{self, extract::State, routing::post, Json};
use axum::{
self,
extract::State,
routing::{get, post},
Json,
};
use chain_utils::EventSource;
use futures::StreamExt;
use reqwest::StatusCode;
Expand All @@ -19,6 +24,7 @@ impl EventSource for MsgServer {

let app = axum::Router::new()
.route("/msg", post(msg_listener))
.route("/health", get(|| async move { StatusCode::OK }))
.with_state(tx);

#[axum::debug_handler]
Expand Down

0 comments on commit 5391930

Please sign in to comment.