This project is a movie API built with Express.js. It includes features such as user authentication, user management, movie lists, and movie management.
- User authentication (JWT)
- User management
- Add, update, delete movies
- Create and manage movie lists
- File upload support (profile picture upload)
git clone https://github.com/dxtaner/Nodejs-MyNetflix-App
cd Nodejs-MyNetflix-App
npm install
Create a .env
file in the project root directory and add the following variables:
PORT=8082
MONGO_URL=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
npm start
When the server starts successfully, you will see the following message:
Backend server is running on port 8082!
The API supports the following endpoints:
POST /api/auth/register
- Register a new userPOST /api/auth/login
- User login
PATCH /api/users/:id
- Update user informationDELETE /api/users/:id
- Delete a userGET /api/users/all
- Retrieve all usersGET /api/users/:userId
- Retrieve a specific userGET /api/users/stats
- Get user statisticsPATCH /api/users/profile-pic
- Update profile picture
GET /api/movies
- Retrieve all moviesPOST /api/movies
- Add a new movieGET /api/movies/random
- Retrieve a random movieGET /api/movies/:id
- Retrieve a specific moviePATCH /api/movies/:id
- Update a movieDELETE /api/movies/:id
- Delete a movie
POST /api/lists
- Create a new listGET /api/lists
- Retrieve all listsGET /api/lists/:id
- Retrieve a specific listDELETE /api/lists/:id
- Delete a list
express
- Web servermongoose
- ODM for MongoDBdotenv
- Environment variable managementmulter
- File upload handling
If you would like to contribute to the project, please fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License.