mirror of
https://github.com/flibusta-apps/book_bot.git
synced 2026-03-03 15:10:53 +01:00
Add /health endpoint to axum server
This commit is contained in:
@@ -109,8 +109,9 @@ pub async fn start_axum_server(stop_signal: Arc<AtomicBool>) {
|
||||
.with_state(start_bot_mutex)
|
||||
.layer(prometheus_layer);
|
||||
|
||||
let metric_router =
|
||||
axum::Router::new().route("/metrics", get(|| async move { metric_handle.render() }));
|
||||
let metric_router = axum::Router::new()
|
||||
.route("/metrics", get(|| async move { metric_handle.render() }))
|
||||
.route("/health", get(|| async { StatusCode::OK }));
|
||||
|
||||
let router = axum::Router::new()
|
||||
.merge(app_router)
|
||||
|
||||
Reference in New Issue
Block a user