App setup and db connections