- clone this repo
npm i
GCLOUD_PROJECT=fake-project-id ./node_modules/.bin/firebase emulators:start --import=emulator-data --export-on-exit --debug --project fake-project-id
GCLOUD_PROJECT=fake-project-id FIRESTORE_EMULATOR_HOST=localhost:8080 go run demo.go
GCLOUD_PROJECT=fake-project-id FIRESTORE_EMULATOR_HOST=localhost:8080 node demo.js
Note: To see a failure scenariorio, mix and match the GCLOUD_PROJECT
ids. With the consistent ids provided above, writes should work as expected and appear in the UI.
NUM_RECORDS=10000000 GCLOUD_PROJECT=fake-project-id FIRESTORE_EMULATOR_HOST=localhost:8080 go run demo.go
_Note: To see a failure scenario, note the write time for batches predictably decrease over time with a large NUM_RECORDS
value.
% firebase --version
9.12.1
firebase init
- Only added
firestore
and theemulators
- Explicitly set up the emulator
% firebase setup:emulators:firestore i firestore: downloading cloud-firestore-emulator-v1.12.0.jar...