firebase / geofire-js

GeoFire for JavaScript - Realtime location queries with Firebase
MIT License
1.45k stars 346 forks source link

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

Open mekumoshi opened 3 years ago

mekumoshi commented 3 years ago

Version info

Firebase:

GeoFire:

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

Test case

Steps to reproduce

Expected behavior

Actual behavior

ziyaddin commented 3 years ago

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(...).

mekumoshi commented 3 years ago

thanks so much i just figure it out