Connected database to app