client.js referenced localhost in GET request; res.body returned object on no DB results, added conditional to ensure array always returned