Modular Firebase Admin use same class as client

26 views
Skip to first unread message

David Zero

unread,
Jan 20, 2023, 9:24:09 AM1/20/23
to Firebase Google Group
Hello all,

I wanted to know what you advice for my scenario. I have a NodeJS server updating browser game data like unit movements in firebase rtdb, so all players/clients got same positions of units. I programmed the whole client-side by modular firebase and I do have a Database-class that i share (use same) with my server. But it seems that firebase admin database cannot be used modularly (i.e. child(), update(), set() ...). Would you advice to create a different Database class only for server-side and is there a modular admin database version out yet or how would I call onChildAdded on server-side? I am asking because currently there are functions that I would like to share i.e. craft building for client or npc (server). If you need more informations or code, just ask tell me.

Greets

David Zero
Reply all
Reply to author
Forward
0 new messages