Made a little change to db.js exporting the whole module not just the function