-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app-general): add synchronous rtdb initialization
- Loading branch information
1 parent
872eae6
commit b4b228e
Showing
4 changed files
with
21 additions
and
22 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
packages/game-app/src/gameView/apis/initializeRTDBInstance.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import CONFIG from '@pipeline/app-config'; | ||
import firebase from 'firebase'; | ||
|
||
export function initializeRTDB(rtdbInstance: string, gameId: string) { | ||
const app = firebase.initializeApp( | ||
{ | ||
databaseURL: `https://${rtdbInstance}.firebasedatabase.app`, | ||
}, | ||
gameId, | ||
); | ||
CONFIG.REACT_APP_FIREBASE_USE_EMULATORS === 'true' && app.database().useEmulator('localhost', 9000); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 0 additions & 11 deletions
11
packages/game-app/src/userGameStatus/apis/callUpdateConnections.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters