So I'm consuming an API using Backbone.js by referring this book chapter:
https://addyosmani.github.io/backbone-fundamentals/#exercise-2-book-library---your-first-restful-backbone.js-app I've written the server code in Node.js and made a DB connection to MongoDB. However, when I view the network panel I get an empty JSON. Unlike the book, I'm only implementing the GET action to obtain collection. Following is the code in its entirety. Can anyone point out where I'm going wrong?
I have a MongoDB collection called Inflation contained in inflation_database database. I then inserted a document in this collection with attributes `inflationDate` and `value`.
Collection view
Item View
app.js
model
collection
HTML
server.js