Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

databaseURL not found in Firestore SDK snippet

I made a cloud firestore with Google Analytics enabled and I didn't find the databaseURL attribute in Firestore SDK snippet

Here's the CDN:

<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-app.js"></script>

<!-- TODO: Add SDKs for Firebase products that you want to use
     https://firebase.google.com/docs/web/setup#available-libraries -->
<script src="https://www.gstatic.com/firebasejs/8.2.1/firebase-analytics.js"></script>

<script>
  // Your web app's Firebase configuration
  // For Firebase JS SDK v7.20.0 and later, measurementId is optional
  var firebaseConfig = {
    apiKey: "AIzaSyAx5I8j6ZkqCxQ3k1UgGkL5BuwhVK5xezA",
    authDomain: "ninja-firestore-tut-c5340.firebaseapp.com",
    projectId: "ninja-firestore-tut-c5340",
    storageBucket: "ninja-firestore-tut-c5340.appspot.com",
    messagingSenderId: "326083693415",
    appId: "1:326083693415:web:5a8e21d6a0d90fec9d7dc2",
    measurementId: "G-2D61GV0P3Q"
  };
  // Initialize Firebase
  firebase.initializeApp(firebaseConfig);
  firebase.analytics();
</script>
like image 773
DeveloperRuwaid Avatar asked Dec 10 '22 23:12

DeveloperRuwaid


1 Answers

The databaseURL property is for the Firebase Realtime Database, which you probably didn't create yet. The databaseURL property is not necessary to use Firestore though, so you should be able to access that with just the configuration data you have. In fact, for Firestore all you should need is the projectId property.

like image 119
Frank van Puffelen Avatar answered Jun 27 '23 12:06

Frank van Puffelen