Moved db to index.js