gpt4 book ai didi

firebase - 是否可以从 Firebase Functions Shell 运行脚本?

转载 作者:行者123 更新时间:2023-12-02 09:13:35 25 4
gpt4 key购买 nike

我一直在使用 Firebase 函数 shell (firebase Experimental:functions:shell),我发现它非常适合测试 firebase 数据库和 http 监听器。

但是,我必须在 shell 中复制粘贴测试代码,这有点烦人。

有什么办法可以在文件中编写一些 js 代码,然后使用 Firebase shell 运行完整的文件?不用复制粘贴?

最佳答案

是的,将您的脚本发送到 shell 的标准输入。

$ firebase experimental:functions:shell < tests.js

取自 this blog .

您可能仍然需要使用 ctl-C 终止 shell。请 file a bug report如果你想看到这种变化。

关于firebase - 是否可以从 Firebase Functions Shell 运行脚本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49328372/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com