Skip to content

Instantly share code, notes, and snippets.

View tjmaynes's full-sized avatar
🔌
Focused

TJ Maynes tjmaynes

🔌
Focused
View GitHub Profile
...
if is_database_connected {
HttpResponse::Ok()
.content_type("application/json")
.body(serde_json::json!({ "database_connected": is_database_connected }).to_string())
} else {
HttpResponse::ServiceUnavailable()
.content_type("application/json")
.body(serde_json::json!({ "database_connected": is_database_connected }).to_string())
}