What is the difference between starting the firestore emulator through:
firebase emulators:start --only firestore
and:
gcloud beta emulators firestore start
Both options allow my python app to achieve connectivity with the database like so:
import google
from google.cloud import firestore
os.environ["FIRESTORE_EMULATOR_HOST"] = "localhost:8081"
os.environ["FIRESTORE_EMULATOR_HOST_PATH"] = "localhost:8081/firestore"
os.environ["FIRESTORE_HOST"] = "http://localhost:8081"
credentials = mock.Mock(spec=google.auth.credentials.Credentials)
client = firestore.Client(credentials=credentials)
One difference I've noticed myself is that firebase seems to respect my firebase.json, specifically the host port specified like so:
{
"emulators": {
"firestore": {
"port": "8081"
}
}
}
On the other hand, gcloud ignores firebase.json and instead chooses a random port unless I explicitly pass a port through --host-port. Is this part of a bigger difference between the two, and what are some other differences?