Setting Up Local Firebase for Development

Install Firebase Emulator on Local PC

Create Local Firebase Project

Run the following commands on a git bash terminal

# Create a new folder for the project
$ mkdir backend_firebase_rest
$ cd backend_firebase_rest

# Initialize the directory as a firebase project
# Choose these features to setup for this project:  Firestore, Function, Emulators
# On selecting a default Firebase project:
#     - Choose an existing project (and choose the project that you created before, in the previous steps)
#     - Accept the default values for other settings
# On Emulators features setup:
#     - Choose Functions and Firestore
#     - Accept the default values for other settings
#     - Would you like to download the emulators now? Choose Yes

$ firebase init

Note: If Firebase CLI does not work on external git bash terminal, switch to Powershell or cmd, or use integrated terminal in VSCode

Run Firebase Emulators

# To run the emulators
# The emulator UI should be available at http://localhost:4000

$ firebase emulators:start