When putting a MERN app into production via Heroku, you have to assign the Express server to a port environment variable. When in production, does a heroku domain name point to that particular port, so that you can access the express server?
When in production, does a heroku domain name point to that particular port, so that you can access the express server?
Inbound requests are received by a load balancer that offers SSL termination. From here they are passed directly to a set of routers.
The routers are responsible for determining the location of your application’s web dynos and forwarding the HTTP request to one of these dynos.
Users of your application don’t need to know (and, generally speaking, cannot know) what port your application is binding to. That is an internal runtime detail. Heroku automatically routes requests to your running application.
This is true whether the "user" of your application is a human being using a web browser, or whether it’s a front-end application that might be running on a completely different server.
Answered By – Chris