Automatically select the db depending on the url (for Angular + CouchDb apps)