how to use geofire in firebase admin sdk instead of firebase javascript sdk
Opened this issue · 2 comments
mekumoshi commented
Version info
Firebase:
GeoFire:
Other (e.g. Node, browser, operating system) (if applicable):
Test case
Steps to reproduce
Expected behavior
Actual behavior
ziyaddin commented
Basically:
- Import
firebase-admin
package and your Firebase project's json file containing credentials. - Create a config object
firebaseConfig
by initializing Firebase Admin app viaadmin.initializeApp()
and specifyingcredential
anddatabaseURL
property values. - Create a database object
firebaseDatabase
viafirebaseConfig.database()
.
The next steps are same with Firebase SDK's steps: you initialize GeoFire object by specifying Database Reference via firebaseDatabase.ref(...)
.
mekumoshi commented
thanks so much i just figure it out