As described in the previous section, client-server interaction is all about asynchronicity. As we alter our Personal Trainer app to load data from the server, this pattern becomes self-evident.
In the preceding chapter, the initial set of workouts and exercises was hardcoded in the
WorkoutService implementation itself. Let's see how to load this data from the server first.
Earlier in this chapter, we seeded our database with a data form, the
seed.js file. We now need to render this data in our views. The MongoLab REST API is going to help us here.
The MongoLab REST API uses an API key to authenticate access request. Every request made to the MongoLab endpoints needs to have ...