Skip to content

Commit

Permalink
Adds a simple healthcheck endpoint for the items service
Browse files Browse the repository at this point in the history
This change follows #736, and adds an HTTP healthcheck to the items API to ensure the scala service has started before it is registered healthy at the NLB and starts serving requests.
  • Loading branch information
kenoir committed Jan 19, 2024
1 parent 7e5f4da commit 9a24603
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions items/src/main/scala/weco/api/items/ItemsApi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ class ItemsApi(
case id =>
notFound(s"Work not found for identifier $id")
}
},
pathPrefix("management") {
concat(
path("healthcheck") {
get {
complete("message" -> "ok")
}
})
}
)
}

0 comments on commit 9a24603

Please sign in to comment.