morecallan / movie-history-api

Zoe is awesome.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

initialize firebase app

zoeames opened this issue · comments

Story

As a developer, when I start my app, it should initialize with firebase.

Acceptance Criteria

When the page loads
Then firebase is initialized

Technical Notes

Test if your app is initialized with console.log("firebase apps?", firebase.apps);

Comment by zoeames
Tuesday Oct 17, 2017 at 04:28 GMT


modify db/apiKeys.json and apiKeys.example.json - Add the firebase config object

Comment by zoeames
Tuesday Oct 17, 2017 at 04:30 GMT


modify javascripts/apiKeys.js

after tmdb.setKey(), it should call firebaseApi.setKey(), then firebaseApi.initializeApp()

Comment by zoeames
Tuesday Oct 17, 2017 at 04:31 GMT


new file javascripts/firebaseApi.js

single function

  1. setKey - this function take a single input - key - and sets it to a private variable called firebaseKey

Comment by zoeames
Tuesday Oct 17, 2017 at 04:31 GMT


modify index.html. add script tag:

<script src="https://www.gstatic.com/firebasejs/4.5.2/firebase.js"></script>