I have a React Application and I wish to deploy this behind a load balancer, where the load balancer periodically pings the app to see whether it's healthy. My requirement is to provide a /health
endpoint, that can be used for health checking.
What would be the ideal way to implement a health endpoint?
- This is something that is required for anyone planning to deploy a React App in a auto-healing fashion
- The main page of this App is
/dashboard
, which is a heavy page. Hence, it cannot be used as a health endpoint.
i.e: I have seen react apps which have /hello
kind of endpoints which return a simple message like I am healthy
.