db.js as angular service