Skip to content

Latest commit

 

History

History
16 lines (8 loc) · 1.08 KB

exercises.md

File metadata and controls

16 lines (8 loc) · 1.08 KB

Exercise 12: Fetching from a simple JS client

Goal: Create a simple (i.e., non React) client to consume one of the "HeapOverrun" API.

Create a simple-application project using HTML, plain JavaScript, and fetch to get the list of all questions from the API Server in Express developed last week. Set up CORS accordingly on the server.

Exercise 13: React meets Express - part I

Goal: Start connecting the "HeapOverrun" React Client and the API Server.

Starting from the React application developed in Week 10 and the API Server in Express developed in Week 04, make the React application consume some of the APIs to get the content.

In particular, replace the "fake" questions and answers with the information obtained through the server. To do so, set up CORS appropriately in Express, call the appropriate APIs from React (see the empty API.js file in react-qa), and set up useEffect() as needed.

For this week, we want to call the APIs to get the list of questions and the associated answers for each of them. Ignore the creation, editing, or deletion of questions and answers.