Where is the documentation for Realtime Database inside Cloud Function? #1121
Answered
by
puf
sorcamarian
asked this question in
Q&A
-
Where is the documentation for Realtime Database inside Cloud Function? |
Beta Was this translation helpful? Give feedback.
Answered by
puf
Jan 1, 2024
Replies: 2 comments 1 reply
-
I was searching for basic things like how to get all the values of a path
|
Beta Was this translation helpful? Give feedback.
1 reply
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
The only thing that's specific to Cloud Functions there is how you get a reference to the database, for the rest it's just the regular JavaScript/Node.js SDK.
For getting a DB reference, you can either get it from the event that triggered the function (through
event.data.ref.root
) or by initializing the Admin SDK and then getting it from there.If you tried this and can't get it to work, I recommend posting a minimal repro to one of the more support oriented communities, such as Stack Overflow or /r/Firebase on Reddit.