├── README.md ├── firebase-test ├── firebasetest.js └── index.html ├── index.html └── profile.html /README.md: -------------------------------------------------------------------------------- 1 | # pair-partners 2 | A web app that helps people find study partners for virtual pair programming and collaboration 3 | -------------------------------------------------------------------------------- /firebase-test/firebasetest.js: -------------------------------------------------------------------------------- 1 | // Initialize Firebase 2 | var config = { 3 | apiKey: "AIzaSyCdoBkKYmhVlgvy46sBKLLknJUszf-TYAc", 4 | authDomain: "test-web-app-4fde9.firebaseapp.com", 5 | databaseURL: "https://test-web-app-4fde9.firebaseio.com", 6 | projectId: "test-web-app-4fde9", 7 | storageBucket: "test-web-app-4fde9.appspot.com", 8 | messagingSenderId: "406177608219" 9 | }; 10 | 11 | firebase.initializeApp(config); 12 | 13 | // Create a JavaScript object for the HTML element that has id="message" 14 | var messageBox = document.getElementById("message"); 15 | // Create a JavaScript object for the HTML element that has id="username" 16 | var usernameBox = document.getElementById("username"); 17 | 18 | // Get a reference to the root of our database 19 | var dbRef = firebase.database().ref(); 20 | // Get a reference to the "greeting" section of our database 21 | var dbGreeting = dbRef.child("greeting"); 22 | // Get a reference to the "myname" section of our database 23 | var dbUsername = dbRef.child("myname"); 24 | 25 | // Whenever "greeting" value in our database is updated, show the data inside messageBox! 26 | dbGreeting.on("value", function(dataSnapshot) { 27 | messageBox.textContent = dataSnapshot.val(); 28 | console.log( dataSnapshot.val() ); 29 | }); 30 | 31 | // Whenever "myname" value in our database is updated, show the data inside usernameBox! 32 | dbUsername.on("value", function(dataSnapshot) { 33 | usernameBox.textContent = dataSnapshot.val(); 34 | console.log( dataSnapshot.val() ); 35 | }); 36 | -------------------------------------------------------------------------------- /firebase-test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |I'm working on this app. Let's do it together. 19 |
20 | 21 | 22 | 23 | 24 |I'm working on this app. Let's do it together. 32 |
33 | 34 | 35 | 36 | 37 |I'm working on this app. Let's do it together. 45 |
46 | 47 | 48 | 49 | 50 |Online vs Offline
17 | -Schedule
40 | - 41 | - 42 | - 43 | - --------------------------------------------------------------------------------