In client’s package.json
Add following code
"proxy": "http://localhost:5000"
In root directory’s package.json
Add following code
"devDependencies": {
"nodemon": "^2.0.6",
"concurrently": "^5.3.0"
},"scripts": {
"server": "nodemon server.js",
"client": "cd client && npm start",
"dev": "concurrently \"npm run client\" \"npm run server\""
},
Now, run both React & Node.
npm run dev