今天,Firebase发布了全新的Cloud Products for Firebase产品,我刚创建了一个hello world功能,并将其部署在我现有的firebase项目中.
看起来它捆绑所有依赖项并将其上传到firebase就像aws lambda函数一样.但即使在代码的微小变化上也需要太多时间才能完成,并且还需要良好的互联网连接.如果由于某种原因您处于脱机状态,那么在您可以在本地计算机上执行和测试该功能的方法之前,您所处的代码就处于黑暗状态.
有没有办法在本地测试Firebase的云功能?
function node.js firebase google-cloud-functions firebase-cloud-functions
我正在尝试使用Cloud Functions for Firebase拨打苹果收据验证服务器.知道如何进行HTTP调用吗?
node.js firebase google-cloud-functions firebase-cloud-functions
组织Firebase的所有云功能的最佳做法是什么?
我从示例GitHub存储库中看到所有函数都驻留在一个index.js文件中.
我想对于更大的项目,有更好的方法在不同的文件/目录中组织Firebase的Cloud Functions.
在Cloud Functions for Firebase中,例如:
exports.makeUppercase = functions.database.ref('/messages/{pushId}/original')
.onWrite(event => {
//how to access data at another node, for example
//important/messages/{pushId}
})
Run Code Online (Sandbox Code Playgroud)
例如,如何在另一个节点读取数据/important/messages/{pushId}?谢谢
firebase firebase-realtime-database google-cloud-functions firebase-cloud-functions