To get comfortable with making web requests and handling responses you should replicate what we did in this chapter.
What you have to do is to consume an API in order to:
Create a table and display existing movies
Modify existing movies
Store new movies in the database
Delete movies from the database
I have prepared the database and the API for you. You only have to write HTML and JavaScript.
If you have followed the instructions from Download book's code of Chapter 8, Consuming an API – Preface, open your terminal and run:
cd ~/themajestyofvuejs/apis/movies sh setup.sh
If you haven't, you should run this:
mkdir ~/themajestyofvuejs cd ~/themajestyofvuejs git clone https://github.com/hootlex/the-majesty-of-vuejs . cd ~/themajestyofvuejs/apis/movies sh setup.sh
You now have a database filled with great movies along with a fully functional server running on http://localhost:3000
!
To ensure that everything is working fine browse to http://localhost:3000/api/movies
and you...