I used Homebrew to install Node. Before starting, I like to run the following commands...
Homebrew Commands:
brew update
brew upgrade
Check which version of Node and NPM you are running:
node -v
npm -v
Initialize a React App:
npx create-react-app frontend
or
npm init react-app ./frontend
Initialize the Node backend:
mkdir backend
cd backend
npm init -y
frontend folder needs this package installed:
npm install react-router-dom
backend folder needs these packages installed:
npm install --save-dev nodemon
npm install express body-parser concurrently
Update the frontend/package.json with the "proxy" code:
"proxy": "http://localhost:4000/",
See the package.json file for npm run scripts.