Stack Used:
- Backend with Node and Express
- React frontend
- MongoDB for database
- Create a MongoDB database and obtain your
MongoDB URI
- MongoDB Atlas
Rename the .env.example
file to .env
and add the following
NODE_ENV = development
PORT = 5000
MONGO_URI = your mongodb uri
JWT_SECRET = 'abc123'
"dependencies": {
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.6",
"dotenv": "^16.0.3",
"express": "^4.18.2",
"express-async-handler": "^1.2.0",
"jsonwebtoken": "^9.0.0",
"mongoose": "^7.2.0"
},
npm install
cd frontend
npm install
# Run frontend (:3000) & backend (:5000)
npm run dev
# Run backend only
npm run server
# Create frontend prod build
cd frontend
npm run build