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