// This snippet file was generated by processing the source file: // ./database-next/emulator-suite.js // // To update the snippets in this file, edit the source and then run // 'npm run snippets'. // [START rtdb_emulator_connect_modular] import { getDatabase, connectDatabaseEmulator } from "firebase/database"; const db = getDatabase(); if (location.hostname === "localhost") { // Point to the RTDB emulator running on localhost. connectDatabaseEmulator(db, "127.0.0.1", 9000); } // [END rtdb_emulator_connect_modular]