You deploy your app. The build succeeds. The logs show the server starting. You click the URL your deployment platform gave you and get a connection error, a 502, or nothing at all.
This is one of the most common first deployment failures, and the cause is almost always the same: the app is binding to the wrong address, or listening on the wrong port, or both.
What port binding actually means
When a server app starts, it listens for incoming connections on a network address. That address has two parts: the IP address it listens on, and the port number.
The IP address determines which network interfaces the application accepts connections from. localhost (which resolves to 127.0.0.1) means the app only accepts connections from the same machine. 0.0.0.0 means the app accepts connections from any network interface, including external ones.






