$ git clone https://github.com/sathninduk/mern.git ./mern
notice, you need client and server runs concurrently in different terminal session, in order to make them talk to each other
rename .env.example file as .env and specify your API URL (http://localhost:4000/)
REACT_APP_API_URL
$ cd client // go to client folder
$ npm i --legacy-peer-dep // npm install packages (flag to fix mui version conflicts)
$ npm start // run it locally
// client build
$ npm run build
$ serve -s build
rename .env.example file as .env and specify the following variables there,
CORS_URL
MONGO_URI
JWT_SECRET
# Google OAuth2 Keys - to send emails
GOOGLE_API_SERVICE
GOOGLE_API_TYPE
GOOGLE_API_USER
GOOGLE_API_CLIENT_ID
GOOGLE_API_CLIENT_SECRET
GOOGLE_API_REDIRECT_URL
GOOGLE_API_REFRESH_TOKEN
How to obtain new Google API Variables: Watch
$ cd server // go to server folder
$ npm i // npm install packages
$ npm start // run it locally
Use seed.json file at the root directory as your database seed file to add admin user record to the users collection.
Step 1
Create database mern
Step 2
Create collection users
Step 3
Import seed.json to the users collection
Summary
Database: mern, Collection: users, Seed file: seed.json
Email: admin@admin.com
Password: admin123
This project is licensed under the MIT License