R
Railway2y ago
will

NodeJS web app issues

Hello! I'm trying to deploy my NodeJS web app (using Fastify), but I'm running into an error (Application Error > Is your app correctly listening on $PORT?) I am correctly listening to process.env.PORT, however. My project ID is 97f8d68c-ca6e-469c-b7c3-f922f74c2cd6. Any help would be appreciated :)
10 Replies
nebula
nebula2y ago
are you listening on 0.0.0.0
will
will2y ago
do I need to specify 0.0.0.0:${PORT}? I simply have fastify.listen({ port: process.env.PORT || 3000 } right now
nebula
nebula2y ago
i think so yeah
will
will2y ago
ah well then Fastify throws an error validating the port: options.port should be >= 0 and < 65536. Received 0.0.0.0:6404
Finn
Finn2y ago
Is that setting the port to 0.0.0.0:6404 That seems wrong
will
will2y ago
no yeah that is definitely not the way to go, that was just for testing neb's point. It is currently setting it to process.env.PORT
Finn
Finn2y ago
is your code opensource
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
will
will2y ago
deploying now... not sure what took the deployment so long, but it works! thank you so much!!! :DD