我创建了应用程序,安装了命令行界面,在index.html中添加了脚本。然后我在实时数据库中添加了记录{number: 1},登录并初始化了项目文件夹中的firebase。 ? 这是我的index.html <script src="https://www.gstatic.com/firebasejs/7.6.1/firebase-app.js"></script>
<!-- TODO: Add SDKs for Firebase products that you want to use
https://fireba
这是我的实时数据库
我使用firebase实时数据库,我使用如下规则:
{
"rules": {
"$uid": {
".read":"$uid === auth.uid",
".write": false
}
}
}
当我按照下面的规则使用操场规则时,这里我设法读取了上面的121212条数据。
这是我的代码片段。
<script>
// Import the functions you need from the SDKs you need
我正在尝试连接到firebase实时数据库(不是firestore),但我得到的错误是db.collection不是一个函数。StackOverflow中的其他答案是关于Firestore的。谢谢你的帮助。 const admin = require('firebase-admin');
// Firebase configuration - this should not be public.
// Please use your own config if you intend to use this code.
var firebaseConfig = {
api
目前,我无法从谷歌实时数据库中提取数据库,我也不知道我做错了什么。下面是我的分类页面中的代码。
import CategoryHeader from '../../components/CategoryHeader';
import database from '../../DataManagement/data/data.json';
import Product from './product';
import { app } from '../../firebase/firebase';
export default f