This project was bootstrapped with Create React App.
You can watch this video and follow along
Note you will need to sign up for a mongoDB account:
(I created my cluster on AWS - Australia Region)
I recommend setting up the backend/ frontend in the order below:
-
npm init -y (creates the package.json file which will enable npm to run in the directory)
-
npm install express
-
npm install cors
-
npm install mongoose
-
npm install dotenv
-
npm install -g nodemon (NOTE: this will install nodemon onto your machine, this allows your node.js applications to restart when file changes in their directory are detected)
-
brew cask install insomnia (this is for testing requests towards your backend routes)
Just run "npm install" in the root of the cloned repo and npm will take care of things for you based on the package.json file (in fact this would probably work for the backend stuff too)
In the project directory, you can run: npm start npm build npm test npm eject
BACKEND: nodemon server (this starts and runs your backend server)