Introduction: Firebase Local Emulator Suite

Get an introduction to Firebase Local Emulator Suite.

Firebase local emulator suite

In May 2020, Firebase launched a new way to test locally! It’s called the Firebase Local Emulator Suite. It is a set of advanced tools for developers looking to build and test apps locally using Cloud Firestore, Realtime Database, Authentication, Cloud Functions, Cloud Pub/Sub, and Firebase Hosting. Local development with Local Emulator Suite can be a good fit for your prototyping, development, and continuous integration workflows.

Emulator in your web application

So far, when we executed npm run dev in the services/web directory, the dev script in the firebase subfolder was called as well. This script ran firebase serve, which needed an internet connection to connect to the Firebase project in the cloud. More importantly, it only provided hosting locally. Any documents (i.e. blog posts) we create in the admin area are added to the Firestore database in the cloud.

We are going to use the local emulator suite to keep all changes locally! If we refer to the project overview diagram, the following architecture shows the specific part we will be working on in this chapter.

Get hands-on with 1200+ tech skills courses.