Firebase Emulator Suite

Pium Sudhara
3 min readDec 18, 2020

--

Advanced tools for developers build and test apps locally

Image from firebase.google.com

What is Firebase Emulator Suite?🤔

Before on year ago at Firebase Summit 2019, Google has been introduced new feature into the Firebase. They introduced Firebase Emulator Suite. An advanced tools for developers 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.

Image from firebase.google.com

So basically with Firebase Emulator Suite have tools to run your web or mobile app in locally. This might help you to testing or debugging your app.

So which Firebase features and platforms are supported?🤔

According to the Firebase documentation Firebase Local Emulator Suite allows you to test your code with our core products in an interoperable way. The Cloud Functions emulator supports HTTP functions, callable functions, and background functions triggered by Cloud Firestore, Realtime Database and Cloud Pub/Sub; the Cloud Functions emulator does not support background functions triggered by Auth or Cloud Storage for Firebase. For Cloud Firestore and Realtime Database emulators, Security Rules emulation is built in.

Image from firebase.google.com

Setup Firebase Emulator Suite

To better understand this let’s connect emulator suite with our web application.

  • To setup emulator suite first of all we need to install Firebase CLI. Following command will install Firebase CLI.
npm install -g firebase-tools
  • Once your installation is completed you must log into your Firebase CLI
firebase login
  • After authentication create your web application and in that project folder run the following command.
firebase init
  • ‘firebase init’ command will initialize Firebase on your project folder. I already added Firestore, Function, Hosting and Emulators to the project folder.
  • After adding necessary tools to the project, we can start our Firebase Emulator. To do that run the following command.
firebase emulators:start

Done! Now our Firebase emulator is running. To view the Firebase Emulator and status run http://localhost:4000 on your browser.

Finally

I hope this article will help you to know about of Firebase Emulator Suite. In next articles let’s talk about how to work with Firebase Emulator Suite. If you need any help follow me on GitHub, LinkedIn or Twitter.

That’s it, thank you all..! don’t forget to leave a 👏✌️ Use Firebase🔥 Happy Coding✌️❤️

--

--

Pium Sudhara
Pium Sudhara

Written by Pium Sudhara

Senior Cloud Operations Engineer at LSEG☁️💻 | AWS Community Builder | pium.karunasena@gmail.com

No responses yet