Moving database connection to main.js.