Firebase prueba

Tutorials of (Firebase prueba) by Ruben mesa

<!DOCTYPE html>
<html >
<head>
  <meta charset="UTF-8">
  <title>Firebase prueba</title>
  
  
  
  
  
</head>

<body>
  
  <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script>
<script src='https://www.gstatic.com/firebasejs/3.5.3/firebase.js'></script>

    <script  src="js/index.js"></script>

</body>
</html>
/* Downloaded from https://www.codeseek.co/ */
/* Downloaded from https://www.codeseek.co/ */

  // Initialize Firebase
  var config = {
    apiKey: "AIzaSyCbc9lx8vYzlOTCpCTguJDCZwTs5zAcQ8Y",
    authDomain: "proyecto-foil.firebaseapp.com",
    databaseURL: "https://proyecto-foil.firebaseio.com",
    storageBucket: "proyecto-foil.appspot.com",
    messagingSenderId: "775712348708"
  };
  firebase.initializeApp(config);


var db = firebase.database();

function cargarUsuarios(){
    
    $.getJSON( "http://institutozonzamas.org/daw/profesores.php?callback=?", function( datos ){
          var elementos = {}
          
          $.each(datos,function(indice,dato){  //se genera el html para hacer un listado de enlaces  
              elementos["DNI "+ dato.id]={"Nombre":dato.nombre, "Apellidos": dato.apellidos}
              
          });

db.ref('agenda').set(elementos)
    }); 


db.ref("agenda").on('value', function(snapshot){
  console.log(snapshot.val());
});
}
//cargarUsuarios();

This awesome code ( Firebase prueba ) is write by Ruben Mesa, you can se more from this user in the personal repository

You can find the original code on Codepen.io

2018 © Ruben Mesa