Task for Backend Developer – NodeJS
Task to be done in Node.js (v12 or higher) with ExpressJS and MySQL (v5.7 or higher).
- Featured image
- Movie length (in minutes)
- Movie release date
1 | Jurassic World | A movie about dinosaurs | 90 minutes | June 14 2015
2 | Kick | Salman Khan movie | 120 minutes | April 2014
1 | Language | English
2 | Genre | Action
3 | Language | Hindi
4 | Genre | Comedy
- Category id
- Movie id
1 | 1 | 1
2 | 1 | 2
3 | 2 | 3
4 | 2 | 4
Create an API endpoint for movie list which returns a list of movies, pagination data.
The movie list API should accept filters, page no. and sorting.
Create another route to display movies which uses the movie list api to fetch the data.
Create a list view of movies with pagination after 10 movies. For pagination follow this approach. The arrows need to be on both sides
- Filter by language
- Filter by Genre
- Sort by Length
- Sort by release date
Filter and sort need to work together. Filter and sort should continue to work when I change page. For example refer http://www.shortfilmwindow.com/movies/
Please do not use any CMS. Also sort, filter and pagination need to be server side. Clients should make api calls to get the page/filter/sort results whenever the filter/page/sort changes.
Share the code as a link to a GitHub repository. Please complete this task before 22nd August 2021.