

export async function onDocumentReady() {

  //[START rtdb_emulator_connect]
  let firebaseConfig = {
    // Point to the RTDB emulator running on localhost.
    // Here we supply database namespace 'foo'.
    databaseURL: "http://localhost:9000?ns=foo"
  }

  var myApp = firebase.initializeApp(firebaseConfig);
  const db = myApp.database();
  // [END rtdb_emulator_connect]
}



export async function onDocumentReady() {

  //[START rtdb_emulator_connect]
  let firebaseConfig = {
    // Point to the RTDB emulator running on localhost.
    // Here we supply database namespace 'foo'.
    databaseURL: "http://localhost:9000?ns=foo"
  }

  var myApp = firebase.initializeApp(firebaseConfig);
  const db = myApp.database();
  // [END rtdb_emulator_connect]
}

export async function flushRealtimeDatabase(anRTDBReference) {

  //[START rtdb_emulator_flush]
  anRTDBReference.child("/").set(null);
  // [END rtdb_emulator_connect]
}

Add RTDB flush method using platform SDK methods.
Add RTDB flush method using platform SDK methods.
