How to know if strapi server is ready?

Version    4.19.1 (node v20.11.1) 
Edition    Community

For anyone else looking to set up a /health route
I created a Gist on how to do this here