scrimba
Firebase Realtime database (JavaScript)
[Tn-arabic] Firebase part 1.5 : set data (upload)
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

[Tn-arabic] Firebase part 1.5 : set data (upload)
AboutCommentsNotes
[Tn-arabic] Firebase part 1.5 : set data (upload)
Expand for more info
index.js
run
preview
console
 var firebaseConfig = {
apiKey: "AIzaSyBHMiAD60UYu1V-R-5SxoKViiZVTMVk7wc",
authDomain: "students-6cafd.firebaseapp.com",
databaseURL: "https://students-6cafd.firebaseio.com",
projectId: "students-6cafd",
storageBucket: "students-6cafd.appspot.com",
messagingSenderId: "988005708211",
appId: "1:988005708211:web:17b9d1b1d7198821"
};
// Initialize Firebase
firebase.initializeApp(firebaseConfig);

var database = firebase.database()

var ref = database.ref("students")

// name : azer , age : 20

function createData(name , age){
var student = {
name : name ,
age : age
}
return student
}

var azer = createData("azer" , 20)

ref.push(azer)
Console
" It looks like you're using the development build of the Firebase JS SDK. When deploying Firebase apps to production, it is advisable to only import the individual SDK components you intend to use. For the CDN builds, these are available in the following manner (replace <PACKAGE> with the name of a component - i.e. auth, database, etc): https://www.gstatic.com/firebasejs/5.0.0/firebase-<PACKAGE>.js "
,
index.html
-2:38