【问题标题】:How can I trigger local Firestore Cloud Functions using the emulator?如何使用模拟器触发本地 Firestore Cloud Functions?
【发布时间】:2019-11-13 15:16:51
【问题描述】:

我刚刚按照here 的说明设置了模拟器:

Dan$ firebase emulators:start --only functions
Starting emulators: ["functions"]
✔  functions: Emulator started at http://localhost:5001
i  functions: Watching "/Users/danfein/Desktop/reviews/backend/functions" for Cloud Functions...

我知道在 :5001 有东西在运行。我的本地数据库环境未在本地运行(据我了解,Firebase 不支持此功能),因此由于我的连接已连接到网络,因此我不明白如何触发 :5001。

如何使用我正在运行的 React 实例(如果相关,在 :3000 上运行)触发当前存在于我的函数文件夹中的云函数之一。

这些功能当前正在运行并在云中适当地触发。

【问题讨论】:

    标签: firebase google-cloud-firestore google-cloud-functions firebase-cli


    【解决方案1】:

    您需要按照documentation 中的说明设置您的开发环境。有一个新的模拟器套件将 Cloud Firestore(实际上可以模拟)和 Cloud Functions 联系在一起。

    【讨论】:

    • 嗨,Doug,所以它有点直接跳入命令。我只是在概念化设置后将使用的界面/如何实际触发命令时遇到了麻烦。如果它在那里,现在(对我来说)并不明显。提前感谢您的帮助
    • 您是否点击了底部的快速入门示例?
    • 啊不,没看到那一点。谢谢你指点我,会跳进去
    猜你喜欢
    • 1970-01-01
    • 2017-11-26
    • 2020-07-28
    • 2018-03-27
    • 2020-02-04
    • 1970-01-01
    • 2018-10-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多