【发布时间】:2020-10-30 21:33:44
【问题描述】:
我正在尝试将 Java11 运行时用于 Google 云/firebase 功能,该功能是最近发布的。我想在我的本地机器上测试 Firestore 触发器功能。互联网上的指南似乎正在使用命令 firebase functions:shell 本身启动所需的仿真过程。但是,我没有找到任何方法来为 firebase 函数指定 .jar 文件:shell 命令。或任何指定功能的方式。我知道它不会加载我的 Java http 函数,因为它显示了加载的函数,而 helloWorld 不是其中之一:
gintas-mac:functions gintas$ firebase functions:shell
⚠ Your requested "node" version "10" doesn't match your global version "8"
i functions: Loaded functions: helloWorld
⚠ functions: The following emulators are not running, calls to these services will affect production: firestore, database, pubsub
【问题讨论】:
-
Firebase Functions 只允许 Nodejs 作为运行时。您可以尝试的一件事是使用 Cloud Functions for the Java11 runtime 并查看 Functions Framework for Java 在本地测试它们。
标签: java firebase google-cloud-firestore google-cloud-functions