Now we will explore how to consume this API. We have seen that the API is contained in: localhost:3000/api/, and our root path only has some information regarding the API, as we can see by visiting localhost:3000:
{ started: "2016-05-15T15:20:24.779Z", uptime: 7.017 }
Let's change the root.js and middleware.json files and use some client side libraries to interact with the API.
Change the name of the root.js file inside server/boot to _root.js.
Open middleware.json from server/ folder and add the following highlighted code:
{ "initial:before": { "loopback#favicon": {} }, "initial": { ... }, "helmet#xssFilter": {}, "helmet#frameguard": { ... }, "helmet#hsts": { ... }, "helmet#hidePoweredBy": {}, "helmet#ieNoOpen": {}, "helmet#noSniff": {}, "helmet#noCache...