Firebase 云代码(后端逻辑) [英] Firebase Cloud Code (backend logic)

查看:23
本文介绍了Firebase 云代码(后端逻辑)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑使用 Firebase 而不是 Parse(因为它正在关闭)以满足我未来的移动后端需求.我真的很喜欢它的实时数据库方面,但它没有像 Parse 与 Cloud Code 那样轻松集成后端逻辑.有没有什么简单的方法可以实现这个功能,或者很快就会出现?谢谢.

I am thinking about using Firebase instead of Parse (as that is shutting down) for my future mobile backend needs. I really like the realtime database aspect of it, but it doesn't have backend logic easily integrated like Parse did with Cloud Code. Is there any easy way to achieve this functionality, or will it be coming soon? Thanks.

推荐答案

更新(2017 年 3 月 10 日):Firebase 刚刚发布 Cloud Functions for Firebase,它允许您在 Google 的服务器上运行 JavaScript 函数以响应 Firebase 事件(例如数据库更改、用户登录等).此外,Zapier 在 Firebase 上的表现并不是那么好,因此在这一点上有更好的解决方案和 Firebase Storage,Firebase 现在为数据库、存储和推送需求提供单一解决方案.

Update (March 10, 2017): Firebase just released Cloud Functions for Firebase, which allows you to run JavaScript functions on Google's servers in response to Firebase events (such as database changes, users signing in and much more). Additionally Zapier doesn't play all that nice with Firebase so there are better solutions at this point and with Firebase Storage, Firebase now offers a single solution for database, storage and push needs.

Firebase 不直接支持推送.但是,Firebase 是一个实时动态数据库,它会在数据发生变化时通知您的应用:添加、编辑或删除,这可能满足推送需求.

Firebase doesn't directly support push's. However, Firebase is a live and dynamic database that notifies your application whenever data changes: added, edited or removed which may address the need for push.

此外,如果您需要直接支持数据推送(代替内置功能或除内置功能外),您可以利用 Zapier.com(或其他)提供该功能.

Additionally, if you need to directly support pushing of data (instead of or in addition to the built-in functionality) you can leverage Zapier.com (or others) to provide that functionality.

通过Firebase 规则来限制对 Firebase 中数据的访问这为谁可以访问数据提供了灵活性(并且还可以保证数据的存储方式和存储内容

Restricting access to data in Firebase is done with Firebase Rules which offer flexibility in who can access data (and can also guarantee how and what data is stored

与 S3(文件存储)的接口也可以通过 Zapier 轻松完成,并且根据您的文件大小(<10M),您还可以将文件保存在 Firebase 中.

Interfacing with S3 (file storage) can also be pretty easily done through Zapier, and depending on your file size (<10M) you could also save files in Firebase.

这篇关于Firebase 云代码(后端逻辑)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆