This repository provides an example about handling counters in Firestore using Cloud Functions for Firebase.
Check the article for more information.
This project is using pnpm as the package manager.
pnpm install
pnpm start
The start
script is configured to run the Firebase Emulator, importing data from the /emulator
folder and exporting data to the same folder on exit. When you run pnpm start
, this script will be executed:
firebase emulators:start --import=./emulator --export-on-exit ./emulator
After successfully executing pnpm start
, open the Firestore Emulator UI at http://localhost:4000/firestore then add and/or delete documents from the residents
collection to see the functions in action.