Skip to content

Commit

Permalink
Merge pull request #4 from MiSArch/health-endpoint
Browse files Browse the repository at this point in the history
Health endpoint
  • Loading branch information
legendofa authored Apr 17, 2024
2 parents b94d088 + 1441e68 commit 3cf62b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use async_graphql_axum::{GraphQLRequest, GraphQLResponse};

use axum::{
extract::State,
http::header::HeaderMap,
http::{header::HeaderMap, StatusCode},
response::{self, IntoResponse},
routing::{get, post},
Router, Server,
Expand Down Expand Up @@ -195,6 +195,7 @@ async fn start_service() {

let graphiql = Router::new()
.route("/", get(graphiql).post(graphql_handler))
.route("/health", get(StatusCode::OK))
.with_state(schema);
let dapr_router = build_dapr_router(db_client).await;
let app = Router::new().merge(graphiql).merge(dapr_router);
Expand Down

0 comments on commit 3cf62b8

Please sign in to comment.