- Open the personsdb.json and look inside. This is an array of person objects
- Read the jsonserver.md file to see how to install and run the jsonserver with the mockdata from personsdb.json.
- Skim this Resource to see what you can do with the json server
- Test the server with Postman making get and post requests
- Create a html page and a js file and link them.
- In the html page make a div with id = app.
- In the js file create a fetch call that can console.log all the person objects from the jsonserver
- make a function that can transform the array of person objects and create a text string with html table element with all the persons in each a different row and all data of each object in tags. Insert the table in the app element. See a solution if you are stuck
- Add a form to the html page to collect all the information needed to add a new person to the server.
- Add a submit button and in the js file make an event handler that can use af fetch call to post data to the server.
- Test that you can add data via the form.
- Create (if not allready done) headers to each column in the table
- Make each column name clickable and attach an event handler
- Make the event handler sort the data based on the column that was clicked.