【发布时间】:2017-06-09 02:37:57
【问题描述】:
// cloud functions
exports.listenOnWrite = functions.database.ref('/foo/{id}').onWrite(event => {
console.log("did match....");
})
例如匹配:/foo/123123 和 /foo/jk3489
// node.js
function startLitener() {
firebase.database().ref("/foo/{id}").on('child_added', function (postSnapshot) {
console.log("did match....");
});
};
什么都不匹配
1) 问题
我了解 ref 路径中非常舒适的 {} 语法仅适用于云函数。 还是我错过了什么?
2) 问题
如何在 nodejs 服务器上制定ref('/foo/{id}')?
【问题讨论】:
标签: node.js firebase google-cloud-functions