This is a Movie Listing project using React Hook. The project as of Jan 2019 makes use of Create React App @ 16.7.0-alpha.2 so it's not supposed to be used in any production application and was developed for a bit of fun.
This project is also a great way to understand how to develop a PWA with CRA using Google's Workbox service worker, something that at the time of development wasn't documented or easy to understand.
For more info within the project checkout the following files:
./config-overrides.js
./src/sw.js
💩 The solution requires a TMDb account to request an API key.
- TMDb Movies Now Playing API
- TMDb Movie genres API
- TMDb Image API
- Minimum rating input with a range between 0 and 10, increments of 0.5 and a default set to 3. Multiple genres input (checkboxes). Must only contain genres from the TMDb API that are in the returned movie result set.
This solution uses Google's WorkBox service worker (SW) for a PWA. The SW overriding the Create-React-App service worker using a config-override.js during the compiling process. THE SERVICE WORKER WILL ONLY CACHE AS BUILD.
So, for example:
localhost:5000
localhost:3000
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You’ll need to have Node >= 6, npm >= 5.2 and Yarn >= 1.12.3 on your machine. You'll need a The Movie Database account with an API key. This can be created at the following URL: https://www.themoviedb.org/account/signup
After cloning the project from Github change directory into the folder that you've created for the project.
Run the following in the terminal
git clone https://github.com/dbraben/movie-listings
cd movie-listings
npm install
yarn start
IMPORTANT Go to the App.js file in Src/Components/App.js and add your API key from TMDB to variable 'API_KEY' on line 8.
After cloning the project from Github change directory into the folder that you've created for the project
yarn build
- React-Rangeslider - A fast & lightweight react component as a drop in replacement for HTML5 input range slider element.
- React-Truncate - A simple text length truncator