The objective of this interview is to:
- Load a JSON file with Python and parse it as JSON
- Modify the
rating
key of every dict in the list
- If it's greater than 4.5 change the value with
Excelente
- In any other case change the value with
Muy bueno
- Return the modified data and serve it via HTTP
- Request the file from a React frontend
- Build a "card" React class
- Render one card per each element of the JSON data
backend/server.py
frontend/Exercise.js
frontend/Exercise.css
(optionally, to add styles to the cards)
Python 3.7 or newer required
cd backend
# with pipenv
pipenv install
pipenv shell
# with venv + pip
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 -m server
Node.js 14 or newer required
cd frontend
npm install
npm start
Both servers will hot reload any code changes