🏠 back to Observable

Firestore API load

Hi,

I would like to use the firebase firestore database directly from an observable notebook. I have been looking notebooks but I see nothing to inspire myself.
The libs for firebase web are:
https://www.gstatic.com/firebasejs/6.3.1/firebase-app.js
https://www.gstatic.com/firebasejs/6.3.1/firebase-firestore.js

I would like to execute a simple example like:
firebase.initializeApp(firebaseConfig);
var db = firebase.firestore();
db.collection(“cities”).doc(“LA”).set({
name: “Los Angeles”,
state: “CA”,
country: “USA”
})

I have tried the import module debugger, but its solution does not work for me. Have anyone trying to do this and succeed ?

Thanks,
Sebas

This seems to work, but I don’t have a Firebase instance to test against to verify:

It works !!! I will publish the notebook with a complete example !!