You can use package.json to install packages for client and server
- express
- nodemon
- cors
- dotenv
- mongoose
- jsonwebtoken
- multer
- bcrypt
- cloudinary
- nodemailer
npm install express nodemon cors dotenv mongoose jsonwebtoken multer bcrypt cloudinary nodemailer
cd server && npm run dev
cd client && npm run dev
- Make sure docker and docker desktop is installed.
- Create docker files for client and server
`- docker build -t imageName .
- docker run -p HostPort:ContainerPort imageName
`docker start containerId
- Following are the ports being used
8000
for Server
5173
for Client
The project's folder structure as follows:
server/
│ ├── .env/
# Envirnment variables.
│ ├── constants/
# Constant routes names.
│ ├── controllers/
# Controllers for managing data and business logic.
| ├── services/
# Services for managing controllers buissness logic.
│ ├── middlewares/
# Middleware functions for validations.
│ ├── models/
# Data models and database schema definitions.
│ ├── routes/
# API routes.
│ ├── utils/
# Utility functions to use across application.
│ ├── cloudinary/
# Utility functions for cloudinary.
│ ├── middlewares/
# Role based validations and token validations.
│ ├── index.js
# Entry point of the application.
- posts/
- comments
- followers/
- users/