Firebase cannnot be initialized on localhost
<p>I can not initialize my Firebase database object in my localhost.
Can any body tell me what is wrong? As these are simple steps I am following from tutorial.</p>

<p>Below is my  script. I debug to find:</p>

<pre><code>TypeError: database.set is not a function. help needed
</code></pre>

<hr>

<pre><code>&lt;script src="https://www.gstatic.com/firebasejs/3.4.1/firebase.js"&gt;&lt;/script&gt;
&lt;script&gt;
  // Initialize Firebase
  var config = {
    apiKey: "*******CNyNrpH0vMVHnfJj44DhT4",
    authDomain: "******.firebaseapp.com",
    databaseURL: "https://*******.firebaseio.com",
    storageBucket: "******.appspot.com",
    messagingSenderId: "*****433543"
  };
  firebase.initializeApp(config);


function function_1() {
  var database = firebase.database.ref();
   database.set("Text").value("hello world");
}
</code></pre>