Added database code to app.js