13. Bonus: Render swapi.co data on the front end (time permitting)
13.1. “Stash” our previous edits
We need to configure Git to allow us to “stash” the changes we make so we can move from branch to branch.
Copy and paste the following commands in the Glitch console:
- Add fake user data to the git configuration and “stash” changes
git config --global user.email "you@example.com" && git config --global user.name "Your Name" && git stash
13.2. Checkout branch 4
Let’s “checkout” the next stage of our front end application to get data from the new swapi API endpoint on our back end.
Copy and paste the following commands in the Glitch console:
- Checkout branch 4
git checkout 4
- Refresh the Glitch file system to see branch 4
refresh
13.3. Follow along with the instructor
Let’s get and render data from swapi.co!
- Edit url data in App.vue
- Test the application in the browser by selecting different resources in the header