Skip to content

Instantly share code, notes, and snippets.

@tjmaynes
Created October 12, 2021 18:11
Show Gist options
  • Save tjmaynes/930d2520dab3d251374a9390ff443cbb to your computer and use it in GitHub Desktop.
Save tjmaynes/930d2520dab3d251374a9390ff443cbb to your computer and use it in GitHub Desktop.
async fn get_health_status(data: web::Data<AppState>) -> HttpResponse {
let is_database_connected = sqlx::query("SELECT 1")
.fetch_one(&data.db_conn)
.await
.is_ok();
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment