geofire-js icon indicating copy to clipboard operation
geofire-js copied to clipboard

how to use geofire in firebase admin sdk instead of firebase javascript sdk

Open mekumoshi opened this issue 2 years ago • 2 comments

Version info

Firebase:

GeoFire:

Other (e.g. Node, browser, operating system) (if applicable):

Test case

Steps to reproduce

Expected behavior

Actual behavior

mekumoshi avatar Aug 24 '21 09:08 mekumoshi

Basically:

  1. Import firebase-admin package and your Firebase project's json file containing credentials.
  2. Create a config object firebaseConfig by initializing Firebase Admin app via admin.initializeApp() and specifying credential and databaseURL property values.
  3. Create a database object firebaseDatabase via firebaseConfig.database().

The next steps are same with Firebase SDK's steps: you initialize GeoFire object by specifying Database Reference via firebaseDatabase.ref(...).

ziyaddin avatar Aug 24 '21 10:08 ziyaddin

thanks so much i just figure it out

mekumoshi avatar Aug 27 '21 09:08 mekumoshi