This movie collection includes a mix of classic and modern films across multiple genres such as Drama, Action, and Sci-Fi. The collection is designed to showcase variety, ranging from timeless classics to visually stunning modern cinema. This gives a balanced dataset for demonstrating API filtering and genre grouping.
This project is a simple Movie Collection API built using Node.js and Express.js, along with a frontend HTML page that fetches and displays movie data. The API provides three endpoints to view all movies, classic movies, and genre statistics. The frontend uses HTML, CSS, and JavaScript (Fetch API) to interact with the backend and dynamically show results.
- Drama
- Action
- Sci-Fi (Your list may include more depending on your movie data.)
movie-collection-api/
│── server.js
│── package.json
│── README.md
│── .gitignore
│
└── public/
└── index.html
- Method: GET
- Description: Returns all movies
- Sample Response:
[
{
"id": 1,
"title": "The Shawshank Redemption",
"genre": "Drama",
"releaseYear": 1994,
"isClassic": true,
"director": "Frank Darabont"
}
]- Method: GET
- Description: Returns movies marked as classic (released before 2000)
- Sample Response:
[
{
"id": 1,
"title": "The Shawshank Redemption",
"genre": "Drama",
"releaseYear": 1994,
"isClassic": true,
"director": "Frank Darabont"
}
]- Method: GET
- Description: Returns all unique genres with movie counts
- Sample Response:
{
"genres": [
{ "name": "Drama", "movieCount": 2 },
{ "name": "Action", "movieCount": 2 },
{ "name": "Sci-Fi", "movieCount": 2 }
]
}git clone https://github.com/Alfeeee/Movie-Collection-Display-API.git
cd movie-collection-api
npm install
node server.js
-
API Base URL:
http://localhost:3000 -
Endpoints:
/movies/movies/classics/movies/genres
-
Frontend Page:
http://localhost:3000
- View all movies
- View classic movies
- View genres with movie count
- Interactive frontend using Fetch API
- Classic movies visually highlighted
- Clean project structure and organized code
https://github.com/Alfeeee/Movie-Collection-Display-API.git (Replace with your actual link)
Name: Alfin