Hapijs webservice keeps failing

I have tried deploying my api here and kept failing. It builds and starts, I see the message, “server running on X”. But health check fails and I can’t reach the api from outside. As per the instructions of the hapijs example, (Deploy a Node hapi App | Render), i changed my host from localhost to “0.0.0.0”. But now when I build and run the app, i see the message. "server running on “http://0.0.0.0:10000”. But I can’t reach it and the health checks fail and it says deploy failed after a while. I tried with localhost, same thing. I tried omitting host from server during creation, then I got a very long random string instead of 0.0.0.0. I feel like I’m missing something fundemental but I coudn’t find any related article and even the repo I forked from the hapi example failed the same exact way. This is my first experience deploying an api, please guide me in the right direction.
My server.ts:
const server: Hapi.Server = Hapi.server({ port: process.env.PORT || 3000, host: "localhost", // "0.0.0.0" }) After creating the server i just register my plugins and initialize.

Hi there,

If you’re using a free plan, host 0.0.0.0 with port 10000 should get you up and running.

Please could you share some specific details of the issue you are experiencing that may help us troubleshoot it with you, e.g. any logs/errors/output, specific URLs, service name/ID, reproduction steps, etc. If you don’t want to share these details on the community forum, please feel free to raise a ticket from the “Contact Support” link at the bottom of the Dashboard.

Thanks

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.