This project uses MongoDB, ExpressJS, ReactJS and Node with a slight help of Axios.
This is a simple example of how to make a MERN stack application. The focus of this project is mainly on backend part and not the styling of the application.
This project was bootstrapped with Create React App.
You need to first clone the repository by the following command
git clone https://github.com/rak-shit/MERN-stack-Todo.git
Then you need to install add the dependencies in the root directory. This project mainly uses, Express
, Node
, React
, MongoDB
and Axios
.
You first need to install node and setup the react develpment environment. Then you can download and install MongoDB from the official mongo website MongoDB Download.
Then you can install dependencies like Express
, body-parser
, cors
, mongoose
and nodemon
by the following command in the root directory or the server directory which is inside the root directory
npm install express body-parser cors mongoose nodemon
Then in the root directory install Axios
using
npm insall axios
This step finishes the setting up of the project locally
Go to the server directory and type the following commands on the command line:
nodemon index.js
This will run the server on the PORT 3000
.
Go to the client directory and type the following command on the command line:
npm install
and
npm start
This will run the server on the PORT 8000
.