Skip to content

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

@waghuldetejas

Description

@waghuldetejas

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions