Intermediate step with postgres to deploy a crud app (express, ejs)

Ttrobeglotter5/22/2023
https://stackoverflow.com/questions/74964944/pern-stack-deploying-to-railway

I've been searching everywhere in the docs, SO, and the search function here for 'postgres' to sort out an issue with deployment.

I get this error:
Looks like your app is listening on 127.0.0.1. You may need to listen on 0.0.0.0 instead.

My code includes the advice from the docs:
const port = process.env.PORT || 3000;
app.listen(port, "0.0.0.0", () => {
console.log(App listening to port ${port});
})

I don't have any variables related to 'PORT' as I assume that's already something integrated into the process. Am I supposed to add a dependency in my app first?