These are the steps you must do before you can run the tutorials for the Visual Chronicle service.
Expect this preparation to take about 20 minutes to complete.
The following instructions describe how to prepare for running the tutorials on Windows. For information about how to prepare MacOS for the tutorials, visit the MacOS installation guide.
http://localhost
hostname, the web-version of Postman can’t perform the exercises.To test your development system, follow these steps:
Create and checkout a test branch of your fork of the Visual-Chronicle repo. Your GitHub repo workspace
is the directory that contains your fork of the visual chronicle
repo.
cd <your GitHub repo workspace>
ls
# (see the visual chronicle directory in the list)
cd visual-chronicle
git checkout -b tutorial-test
cd api
json-server database.json
If your development system is installed correctly, you should see
the service start and display the URL of the service: http://localhost:3000
.
Make a test call to the service.
curl http://localhost:3000/users
If the service is running correctly, you should see a list of users from the service, such as in this example.
[
{
"id": 1,
"name": "Alice Johnson",
"email": "alice@example.com"
},
{
"id": 2,
"name": "Bob Smith",
"email": "bob@example.com"
},
...
If you don’t see the list of users, or receive an error in any step of the procedure, investigate and correct the error before continuing. Some common situations that cause errors include:
If you see the list of users from the service, you’re ready to do the tutorials.