我遵循了在中进行服务器配置的所有步骤,但是当我尝试在浏览器中创建引用时,它会告诉我名为default的应用程序已经存在。那时,如果preiono F5告诉我有"databaseUrl“,我必须确保在启动应用程序firebase时提供该数据。
var express = require('express');
var router = express.Router();
var firebase = require('firebase');
/* GET home page. */
router.get('/', function(re
我正在尝试从firebase获取数据。当应用程序第一次呈现时,authData数组是空的,但是当它多次呈现时,authData数组会选取一些数据。 //import firebase realtime database method
import{db} from './firebase-config';
//handling the posts from the database
const [posts, setPosts]= useState([]);
//handling the user information
const [authData, setAuth
我正在尝试第一次从NodeJS项目部署到firebase,但我还没有设置实时数据库,因为我只计划使用Firestore。然而,当我从项目终端运行firebase deploy时,它抛出了这个错误-- It looks like you haven't created a Realtime Database instance in this project before. Please run firebase init database to create your default Realtime Database instance.,我可以避免创建实时数据库并仍然能够部署吗?使用的
一旦我的Firebase应用程序上的云功能被调用,我想在我的数据库上执行一个查询。
假设我在数据库上有一个特定的触发器,请考虑中提供的示例。
// Listens for new messages added to /messages/:pushId/original and creates an
// uppercase version of the message to /messages/:pushId/uppercase
exports.makeUppercase = functions.database.ref('/messages/{pushId}/original'
我使用下面的代码并在Firebase RealTime数据库中运行良好:
const onDelete = (id) => {
if (
window.confirm("Are you sure that you wanted to delete the contact ?")
) {
Db.child(`contacts/${id}`).remove((err) => {
if (err) {
alert(err);
} else {
alert("Contact Delete
我从Firebase RealTime数据库收集数据到带有按钮的电报bot,显示得很完美,但是当我再次单击按钮时,数据只是重复,而不是更新。
数据收集代码:
firebase = pyrebase.initialize_app(firebaseConfig)
db = firebase.database()
result = []
maps = db.child().get()
def collect_maps():
for map in maps.each():
id = db.child(map.key()).child('id').get()
我正在尝试设置一个Firebase项目,该项目需要使用non-interactive CLI的默认实时数据库实例。
我试过使用这些规则:
❯ firebase deploy --only database
Error: It looks like you haven't created a Realtime Database instance in this project before.
Please run firebase init database to create your default Realtime Database instance.
但是firebase in