Skip to content

Instantly share code, notes, and snippets.

@daviddassau
Last active November 13, 2017 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daviddassau/7c2d43336ecb203a76e5844457339389 to your computer and use it in GitHub Desktop.
Save daviddassau/7c2d43336ecb203a76e5844457339389 to your computer and use it in GitHub Desktop.
Firebase Installation Guide
Create new project on Firebase website
Go to Project Overview > Add Firebase To Your Web App
Copy very first script tag (only one line)
Go to index.html and add that line before all other script tags
Add apiKeys.json and apiKeys.example.json to the db directory, if you haven't already
In apiKeys.json, copy the section in the second set of script tags
Do the same thing in apiKeys.example.json, but make sure to take out all the key values (because this is the file getting uploaded to Github)
Make sure to add "db/apiKeys.json" and "public" to your Gitignore file
This is a good time for a commit
In Firebase, go to Database > Get Started
Click on the three dots on the far right hand side > Import JSON
Click browse and navigate to where your JSON file is
Create apiKeys.js in your Javascripts directory, if you don't have one already
Inside apiKeys.js, create the apiKeys and retrieveKeys functions, if you haven't already
Create a firebaseAPI.js inside your Javascripts directory
Inside it, create `let firebaseKey = "";`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment