title: Firebase initializeApp(config); fun
body: <p>I really cant find this information ANYWHERE. Actually I found one place that had every db call in one js script. </p>
  
  <p>Can someone please clarify if I'm supposed to run this:</p>
  
  <pre><code>var config = {
  apiKey: "AAAPPPIIIIKKKEEEYYYYY",
  authDomain: "test-db.firebaseapp.com",
  databaseURL: "https://test-db.firebaseio.com",
  storageBucket: "test-db.appspot.com"
  };
  
  firebase.initializeApp(config);
  </code></pre>
  
  <p>On every page of my website? Or even just putting it into a js file and calling that file? How do I pass the initialized app around from page to page? Im not using Angular or react or node.js. I just want to use it with straight java script? Is this not possible?</p>
  
  <p>If I call:</p>
  
  <pre><code>&lt;script&gt;
      firebase.auth().onAuthStateChanged(function(user) {
          if (user) {
              console.log('User!!')
          } else {
              console.log('Not User!!')
          }
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>On a page that doesnt call my firebase.js, which the first 5 lines initialize the app, then I get "Not User". I cannot believe that they would want me to initialize the app on every page.. </p>