TypeScript-Node-Starter icon indicating copy to clipboard operation
TypeScript-Node-Starter copied to clipboard

Health Check path

Open vitorarins opened this issue 7 years ago • 3 comments
trafficstars

It would be nice to have an example of health check path. I see more and more applications using these kind of boilerplate and no probe or health check endpoints to check. IMHO that should be default for any application, hence the suggestion :smile:

vitorarins avatar Sep 26 '18 14:09 vitorarins

what kind of health check do you mean? Could you please share some details? @vitorarins

havenchyk avatar Sep 26 '18 14:09 havenchyk

Hey @havenchyk , thanks for the swift response. Nothing fancy, just an endpoint that should answer 200: /health_check -> 200 OK I didn't looked to much into the application but I see it uses MongoDB. So this endpoint could also trigger a function to check DB and if everything is ok, return 200 OK.

Does it make sense?

vitorarins avatar Sep 26 '18 15:09 vitorarins

Well, it certainly makes sense to me, so an additional endpoint can help with detection if the process is down and simple query to DB can help with the connection.

But I'm not a maintainer of this repo ;)

havenchyk avatar Sep 26 '18 16:09 havenchyk