Skip to content

snsttr/firebase-realtime-database-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Firebase Realtime Database Demo

Setup

  1. Setup a firebase realtime database with public read/write permission in your firebase console.

  2. Copy the file "/js/firebase-credentials.js.template" to "/js/firebase-credentials.js"

  3. Enter your firebase config values:

     var window.firebaseConfig = {
         apiKey: "...",
         authDomain: "...",
         databaseURL: "...",
         projectId: "...",
         storageBucket: "...",
         messagingSenderId: "..."
     };
    
  4. Use a webserver of your choice to run this demo

Usage

To see realtime database in action try the following steps:

  1. Open the demo in a browser of your choice and add/edit/delete messages
  2. Open a second window or tab and see that your actions are synchronized across browser windows/tabs.
  3. Use a second browser or the incognito mode to see that your actions are still being synchronized.
  4. tell a friend to setup this demo with the same firebase credentials. Simultaneously perform actions to see that they are still being synchronized.

Warning: Since you gave public access to your database, everybody can read from and write to it. If you publish the demo (e.g. heroku or your website), your credentials may be abused.

Ressources

License

See LICENSE.md

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published