serviceAccountKey.json在哪里或什么是Firebase实时数据库的节点js示例 [英] Where is or What is the serviceAccountKey.json is the node js sample of firebase realtime database

查看:64
本文介绍了serviceAccountKey.json在哪里或什么是Firebase实时数据库的节点js示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经下载了 Firebase实时数据库node.js示例的zip并导航到数据库部分

I have downloaded the zip of Firebase real-time database node.js sample and navigate to the database section

https://github.com/firebase/quickstart-nodejs/tree/主/数据库

然后我找到了第35行,其中包含以下代码

And I located to the line 35 which has the following code

var serviceAccount = require('path/to/serviceAccountKey.json');

但是我想知道serviceAccountKey.json在哪里/什么在哪里?

But I was wondering where is/what is the serviceAccountKey.json?

推荐答案

这是在 Firebase控制台中生成的JSON文件(请参阅将Firebase添加到您的应用),其中包含有关您相应的凭据服务帐户.

It's a JSON file generated in the Firebase Console (see Add Firebase to your App) containing credentials about your corresponding Service Account.

这篇关于serviceAccountKey.json在哪里或什么是Firebase实时数据库的节点js示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆