Moved the database configuration outside the apis