MERN stack boilerplate with store implemented using useReducer + useContext api
Backend
: NodeJS
Database
: MongoDB
Frontend
: ReactJS
Clone the repository and install node modules
git clone https://github.com/RugvedB/MERN-Boilerplate.git
cd MERN-Boilerplate/
cd client
npm i
cd ../backend
npm i
Now create .env file
touch .env
Fill .env with relevant information as follows
PORT=8000
mongoURI= ENTER YOUR MONGOURI HERE
server_base_url=http://localhost:8000
mail_id= ENTER YOUR MAIL ID FROM WHICH VERIFICATION,PASSWORD RESET MAIL WILL BE SENT.
mail_pass= ENTER PASSWORD OF YOUR MAIL ID
SECRET_KEY= somerandomcomplexstring
Now we can start the backend server by using the following command
node index.js
To start frontend server go to root directory and follow the steps(on a new terminal)
cd client
npm start
Checkout the site on http://localhost:3000/register