This application provides access to information about movies from the Golden Age of Italian Cinema (1960-1980). Users are allowed to sign up, update their personal information, and create a list of their favorite movies. The API is built with Node.js and Express.
For detailed documentation of the API endpoints, please refer to the API Documentation.
To run the FlixIt API locally, follow these steps:
- Clone the repository:
git clone https://github.com/your/repo.git
- Navigate to the project directory:
cd repo
- Install the dependencies:
npm install
- Include the following enviromental variables in a .env file:
DB_CONNECTION_URI=your-mongodb-connection-uri
JWT_SECRET=your-jwt-secret
PORT=8080
ALLOWED_ORIGINS=http://localhost:1234,http://anothersite.com
- Start the server:
npm start
- The API will be accessible at
http://localhost:8080
.
- Node.js
- Express
- MongoDB
- Mongoose
- JWT (JSON Web Tokens)
- Bcrypt
- Passport
- GET /movies: Get a list of all movies.
- GET /movies/:title: Get a movie by title.
- GET /movies/directors/:director: Get movies by director.
- GET /movies/genres/:genreName: Get movies by genre.
- GET /genres/:genreName: Get genre by name.
- GET /directors/:directorName: Get director by name.
- POST /users: Create a new user.
- PUT /users/:username: Update user information.
- PUT /users/:username/movies/:movieId: Add a movie to the user's favorite list.
- DELETE /users/:username/movies/:movieId: Remove a movie from the user's favorite list.
- DELETE /users/:username: Delete a user by username.
For detailed documentation of the API endpoints, please refer to the API Documentation.