microsoft / TypeScript-Node-Starter

A reference example for TypeScript and Node with a detailed README describing how to use the two together.
MIT License
11.3k stars 2.76k forks source link

Health Check path #139

Open vitorarins opened 5 years ago

vitorarins commented 5 years ago

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:

havenchyk commented 5 years ago

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

vitorarins commented 5 years ago

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?

havenchyk commented 5 years ago

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 ;)