Dự án Instagram Clone được xây dựng với:
- Backend: Node.js + Express + MongoDB
- Frontend: React.js + Vite
- Cloudinary: Lưu trữ ảnh
.
├── backend # Node.js + Express + MongoDB
├── frontend # React.js + Vite
└── README.md
- Node.js >= 18
- npm >= 9
- MongoDB (local hoặc Atlas)
- Tài khoản Cloudinary để upload ảnh
git clone https://github.com/quangnguyentan/insta_clone
cd insta_cloneChỉ cần chạy:
npm installTạo file .env trong thư mục backend với nội dung:
PORT=8080
SECRET_KEY=your_secret_key
MONGO_URI=your_mongodb_uri
# Cloudinary config
CLOUD_NAME=your_cloud_name
API_KEY=your_api_key
API_SECRET=your_api_secret
# Client URL
URL=http://localhost:5173Chạy lệnh:
npm run devCả backend và frontend sẽ chạy song song:
- Backend: http://localhost:8080
- Frontend: http://localhost:5173
Để upload ảnh, cần đăng ký tài khoản Cloudinary và lấy:
CLOUD_NAMEAPI_KEYAPI_SECRET
Sau đó cập nhật vào file .env của backend.