DEV Community

Discussion on: Dockerize a React app with Node.js backend connected to MongoDb

Collapse
 
kostaslamo profile image
Konstantinos Lamogiannis • Edited

Great article cheers! Just a little note/question. Deploying this at a remote server, having react served by Nginx in clients browser, API requests to localhost will fail. That's because the browser in every client will try to make a request to a localhost:8080 server. So i assume, the production build should also have a functionality of getting the IP of the host that these 2 containers will run in the production server. How would you approach this situation?

Some comments have been hidden by the post's author - find out more