db.js singleton pattern