https://www.mongodb.com/languages/mern-stack-tutorial https://www.mongodb.com/community/forums/t/solved-mern-tutorial-issue-cannot-read-properties-of-undefined-reading-collection/212521
You can clone this repo and change directory to mern-stack-tutorial/
by running these commands:
git clone https://github.com/mavericks-db/mern-stack-tutorial.git
cd mern-stack-tutorial/
To run the backend:
- Change directory to
server/
in the terminal, put your Mongodb Atlas URI in theconfig.env
ATLAS_URI=put_here_your_mongodb_atlas_uri
- Install package dependencies:
npm install
- Run this command:
npm start
- Node-Express App runs on http://localhost:5000
To run the frontend:
- Change directory to
client/
in the terminal - Install package dependencies:
npm install
- Run this command:
npm start
- React App runs on http://localhost:3000