Health Checks Failing Despite Application Running (NodeJS)
I have a rather simple NodeJS application that just listens on 1 path for a webhook and connects to a MongoDB Atlas Database. When deploying the app, even though it’s “failing” I can check the console and see that I have successfully connected to Mongo, that all of my environment variables were set correctly, and that my App is listening on default port 8080. Despite these facts, the health checks are failing and preventing me from setting up a domain and using my application.
I saw 2 similar questions, https://www.digitalocean.com/community/questions/why-am-i-getting-a-deploy-error-health-checks
but the solution to both of these problems seemed to be specifying a host to listen on (‘0.0.0.0’) which I have tried already. By default, Express will listen on all hosts but it didn’t work that way OR when I specified the host.
I have also changed the health checks from TCP to HTTP, and tried various paths. The app works as expected locally, so I’m really not sure what gives. Hopefully this is just a small oversight and I’m missing something.
Any help would be appreciated.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×