miteshtagadiya/microfrontend-react

Failed to load resource: net::ERR_CONNECTION_REFUSED

UMAMAHESHWARIG opened this issue · 1 comments

i cloned the project, then i tried npm start all the projects, i got PORT not recognised so i changed it to set PORT=4001 react-app-rewired start. is it the reason it is refusing connect

In sub-app1/package.json
change scripts:

FROM
"scripts": {
"start": "PORT=4001 react-app-rewired start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-app-rewired eject"
},

TO
"scripts": {
"start": "set PORT=4001 && react-scripts start",
"build": "react-app-rewired build",
"test": "react-app-rewired test",
"eject": "react-app-rewired eject"
},

AND

In sub-app1/.env

#REACT_APP_CONTENT_HOST=http://localhost:4001
PORT:4001

NOTE: Follow the same process for sub-app2,give the port numbers accordingly.