Create db.js

Sets up the necessary MongoDB framework.