- First, let's quickly create the fake backend server. You must install http-server for this:
$ sudo npm install -g http-server
- Create a folder to store your .json file. Let's call it MockRest, as shown:
$ mkdir MockRest $ cd MockRest
- Create the test.json file and fill in the following content for the REST response:
[ { "title": "What a beautiful song", "category": "objects", "description": "Music is a moral law. It gives soul to the universe, wings to the mind, flight to the imagination, and charm and gaiety to life and to everything." }, { "title": "The world we live in", "category": "nature", "description": "Look deep into nature, and then you will understand everything better." }, { "title": "Life experiences", "category": ...