Skip to content

Instantly share code, notes, and snippets.

@shanebarringer
Created September 20, 2016 23:46
Show Gist options
  • Save shanebarringer/e9f3d22ba1b80a6ab76872fbab336453 to your computer and use it in GitHub Desktop.
Save shanebarringer/e9f3d22ba1b80a6ab76872fbab336453 to your computer and use it in GitHub Desktop.
  • Sign up using your google account at the firebase.io
  • create an application from the firebase dashboard
    • take note of the ID generated for your project
    • this can be found in several places, however, the URL is the best place to look
      • your project ID is found directly after /project/
      • https://console.firebase.google.com/project/YOUR-PROJECT-NAME-HERE/overview
  • install the firebase CLI from the command line npm install -g firebase-tools
  • login firebase login
  • Create a project directory from the terminal
    note: don't forget to cd into the new directory
  • initialize the project firebase init
    • select your project name from the list (using the project ID from above)
  • Go back to the Firebase Console in your browser
    • Locate your Application

    • Select the Option for Adding Firebase to your Web App

    • Copy the code snippet

    • paste the code snippet into the <body> of your index.html file (updating it with your own API credentials)

      <body>
      	<div id="message"></div>
      	   	 	
      	<script src="https://www.gstatic.com/firebasejs/3.4.0/firebase.js"></script>
      	   	 	
      	<script>
      	  var config = {
         	  	apiKey: "<API_KEY>",
           	authDomain: "<PROJECT_ID>.firebaseapp.com",
      		databaseURL: "https://<DATABASE_NAME>.firebaseio.com",
          	storageBucket: "<BUCKET>.appspot.com",
        	  };
      	 </script>
      </body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment