This is a simple backend project I built while learning backend development. It includes basic features inspired by YouTube and Twitter.
- Users, videos, tweets, comments, likes, playlists, and subscriptions
- File uploads for videos and images
- Stats and health check routes
- Node.js
- Express
- MongoDB
- Building complex aggregation pipelines in MongoDB (especially in stats controller)
- Working with middleware for authentication and file uploads
- Following REST API best practices
- File handling with Cloudinary
- Clone the repo
git clone https://github.com/Rakesh-46-VR/youtube-backend.git
cd youtube-backend- Install dependencies
npm install- Set up environment variables
- Copy
.env.exampleto.env - Fill in your MongoDB URL
- Add Cloudinary credentials (for file uploads)
- Add JWT secrets
- Start the server
npm run devThe server will run on port 8000 (or whatever you set in .env).