An attempt to learn the MERN stack by following this tutorial: https://codingthesmartway.com/the-mern-stack-tutorial-building-a-react-crud-application-from-start-to-finish-part-1/
To run this on your machine, you will need 4 terminals
(Assuming you have all of these installed on your machines...)
- For react (front-end)
- For nodemon (back-end)
- For mongod
- For mongo
On your react terminal, make sure you are in the mern-todo-app directory and run
npm start
On your nodemon terminal, go to the backend directory and run
nodemon server
On your mongod terminal, go to the backend directory and run
mongod --dbpath=datadb
On your mongo terminal, go to the backend directory and run mongo
first and then the MongoDB Shell will appear.
Run:
use todos
You're all set! Just to the port that npm has assigned your frontend to and start using the app! =)