Firebase in P5JS

Hey there, I want to use firebase in my project and I follow Shiffman’s project to do so, but I think the firebase configuration has changed…

in Shiffman’s HTML he wrote:

	<script src=""></script>

and in the JS:

// Initialize Firebase
  var config = {
    apiKey: "AIzaSyDPekCKX4ee6h9NVR2lEITGAM0XIHn-c7c",
    authDomain: "",
    databaseURL: "",
    projectId: "color-classification",
    storageBucket: "",
    messagingSenderId: "590040209608"
  database = firebase.database();
  authPromise = firebase.auth().signInAnonymously();

I just opened a new Firebase project and the configurations it shows me to copy are quite different from the video, they look like that:

<script type="module">
  // Import the functions you need from the SDKs you need
  import { initializeApp } from "";
  import { getAnalytics } from "";
  // TODO: Add SDKs for Firebase products that you want to use

  // Your web app's Firebase configuration
  // For Firebase JS SDK v7.20.0 and later, measurementId is optional
  const firebaseConfig = {
    apiKey: "AIzaSyDP5vRnX9tY3SR8jEJe-rPVUqQ7KWRwwy4",
    authDomain: "",
    projectId: "my-project",
    storageBucket: "",
    messagingSenderId: "706927492507",
    appId: "1:706927492507:web:d1k376f11b946120de4b04",
    measurementId: "G-9246EG98E6"

  // Initialize Firebase
  const app = initializeApp(firebaseConfig);
  const analytics = getAnalytics(app);

And I can’t figure out what’s going to my HTML and what to my setup (I tried different options and got different errors).

another thing that is different than in Shiffman’s uses:


and my Firebase says to do:

  const app = initializeApp(firebaseConfig);

any help would be amazing :smiling_face: