Add docker build, rewrite Actions for Gitea, and add healthcheck endpoint.
This commit is contained in:
@@ -54,6 +54,7 @@ async fn main() {
|
||||
|
||||
let app = Router::new()
|
||||
.route("/", get(routes::emotes::root))
|
||||
.route("/health", get(routes::health::health))
|
||||
.route("/version", get(routes::version::version))
|
||||
.route("/json", get(routes::emotes::list_emotes))
|
||||
.route("/emotes", post(routes::emotes::create_emote))
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
use axum::response::{IntoResponse, Json};
|
||||
use serde_json::json;
|
||||
|
||||
/// GET /health
|
||||
/// Returns a simple health-check response for liveness probes.
|
||||
pub async fn health() -> impl IntoResponse {
|
||||
Json(json!({"status": "ok"}))
|
||||
}
|
||||
@@ -1,2 +1,3 @@
|
||||
pub mod emotes;
|
||||
pub mod health;
|
||||
pub mod version;
|
||||
|
||||
Reference in New Issue
Block a user