R
Railway3y 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
nebula3y ago
are you listening on 0.0.0.0
will
willOP3y ago
do I need to specify 0.0.0.0:${PORT}? I simply have fastify.listen({ port: process.env.PORT || 3000 } right now
nebula
nebula3y ago
i think so yeah
will
willOP3y 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
Finn3y ago
Is that setting the port to 0.0.0.0:6404 That seems wrong
will
willOP3y 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
Finn3y ago
is your code opensource
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
will
willOP3y ago
deploying now... not sure what took the deployment so long, but it works! thank you so much!!! :DD
Want results from more Discord servers?
Add your server