updates index.js with retrieving objects from db for req.params.name