Last active
February 5, 2017 18:38
-
-
Save kumarmj/a4fadd166dc28fa9a9cc9499449afb69 to your computer and use it in GitHub Desktop.
Getting started with Firebase Realtime Database https://www.youtube.com/watch?v=noB98K6A0TY&index=2&list=PLl-K7zZEsYLmnJ_FpMOZgyg6XcIGBu2OX
This file contains hidden or 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
(function(){ | |
// Initialize firebase | |
const config = { | |
} | |
firebase.initializeApp(config); | |
// Get Elements | |
const preObject = document.getElementById("object"); | |
// Create References | |
const dbRefObject = firebase.database().ref().child('Object'); | |
// Sync object changes | |
dbRefObject.on('value', snap => { | |
preObject.innerText = = JSON.stringify(snap.val(), null, 3); | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment