I used react-java-mysql as base project and added react-express-mysql backend only #21

Open
opened 2025-11-06 14:16:25 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @waghuldetejas on GitHub (Oct 5, 2020).

This is not issue! Help Required!

@glours @jdrouet @aiordache

I have to combine java-mysql and express-mysql in one react app . Java-mysql working fine as it uses 8080 port but unfortunately express-mysql does not seems to be work ,

Please refer below docker-compose file
docker-compose.txt

backend-java uses db-mysql-java
backend-node uses db-mysql-node

in backend-node port 80 replaced by 8086:8085 still can not able to access node api in react project
setup proxy contains code

module.exports = function(app) {
  app.use(
    "/api-java",
    createProxyMiddleware({
      target: "http://backend-java:8080",       // it works fine
      pathRewrite: { "^/api-java": "" }
    })
  );

  app.use(
    "/api-node",
    createProxyMiddleware({
      target: "http://backend-node:8085",    // it does not work 
      pathRewrite: { "^/api-node": "" }
    })
  );
};

which configuration i have to override in this scenario?
Please help me!

Originally created by @waghuldetejas on GitHub (Oct 5, 2020). ### This is not issue! Help Required! @glours @jdrouet @aiordache **I have to combine java-mysql and express-mysql in one react app . Java-mysql working fine as it uses 8080 port but unfortunately express-mysql does not seems to be work ,** Please refer below docker-compose file [docker-compose.txt](https://github.com/docker/awesome-compose/files/5326857/docker-compose.txt) backend-java uses db-mysql-java backend-node uses db-mysql-node in backend-node port 80 replaced by 8086:8085 still can not able to access node api in react project setup proxy contains code ``` module.exports = function(app) { app.use( "/api-java", createProxyMiddleware({ target: "http://backend-java:8080", // it works fine pathRewrite: { "^/api-java": "" } }) ); app.use( "/api-node", createProxyMiddleware({ target: "http://backend-node:8085", // it does not work pathRewrite: { "^/api-node": "" } }) ); }; ``` **which configuration i have to override in this scenario? Please help me!**
Author
Owner

@waghuldetejas commented on GitHub (Oct 5, 2020):

@glours @jdrouet Please Help me !

@waghuldetejas commented on GitHub (Oct 5, 2020): @glours @jdrouet Please Help me !
Author
Owner

@waghuldetejas commented on GitHub (Oct 5, 2020):

Please find full code to rectify exact port problem.

react-java-express-mysql.zip

@waghuldetejas commented on GitHub (Oct 5, 2020): **Please find full code to rectify exact port problem.** [react-java-express-mysql.zip](https://github.com/docker/awesome-compose/files/5327006/react-java-express-mysql.zip)
Author
Owner

@jdrouet commented on GitHub (Oct 11, 2020):

Hi @waghuldetejas,

I'm not working for Docker anymore, but I think, if you want such information/help, I encourage you to join the slack community ;)

@jdrouet commented on GitHub (Oct 11, 2020): Hi @waghuldetejas, I'm not working for Docker anymore, but I think, if you want such information/help, I encourage you to join the [slack community](https://www.docker.com/docker-community) ;)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/awesome-compose#21