简体   繁体   中英

How does Firebase Firestore emulator work?

So far I've been using Firebase Hosting and Functions emulators. But now I'm writting a function that will run based on a Firestore trigger, so I'm looking into the Firestore emulator for development.

But how does it work? Does it mimics Firestore completely? Will I be able to read my current Firestore data that it's saved on server? And what if I update, create or delete change documents, will I be really changing them in my real data as well?

I'll run it with:

firebase emulators:start --only hosting,functions,firestore

The Firestore emulator suites gives you just enough functionality to test locally. It is not a full copy of what the cloud services actually do.

The Firestore emulator does not let you read and write data stored on the server. You have to populate the database locally in order to test locally.

If you want to use data hosted in the cloud service instead, then don't use the emulator - just access your project as normal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM