First, we need to install the json-server package. We will do it globally so we can run it from anywhere in our laptops. Run the following code in your terminal:
$ npm install -g json-server
Go to the terminal and inside the same folder where we have our .json, run the following code:
$ json-server --watch hackmatch.json --port 8000
Now we are ready to start doing requests to our new API, so go ahead and launch a GET request from Postman, you should see all the data we just paste on the hackmatch.json file.
GET http://localhost:8000/candidates
The next step you you already know how it works:
$ create-react-app hackmatch-app
Display all the candidates in cards in the homepage with the picture + name + surname + numberOfLikes + numberOfNexts in the homepage. When we click on the contact, we should be able to display a new page with the information of the candidate.
Create a form and the proper method to add new candidates to our list.
Create a button to display a card with a random candidate. This card will include two buttons: 'Like' and 'Next'. When we click in 'Like', we will update the 'numberOfLikes' + 1 and we will display a new contact. If we click 'Next' we will update the 'numberOfNexts' + 1 and we will display a new contact.