Creating a REST client (and server!)
In this recipe, we will learn about REST and how to build a REST client. To build a REST client, we will need a server that exposes a REST interface; we will build that also. Wait a minute! A whole REST server is a side note in a recipe in a book about Vue? Just follow along and you won't be disappointed.
Getting ready
This recipe is fairly advanced in the sense that you will need to be comfortable with the architecture of client and server and at least have heard or read about REST interfaces. You will also need to be familiar with the command line and have npm installed. You can read all about it in the Choosing a development environment recipe.
Axios will also need to be installed; read more about this in the first recipe of this chapter.
How to do it...
I remember when some years ago, building a REST server could take days or weeks. You can use Feather.js
, and it will be quick and (hopefully painless). Open a command line and install it through npm with...