Firebase:是否可以设置服务器端的定时删除? [英] Firebase: is possible to set a server-side timed deletion?

查看:153
本文介绍了Firebase:是否可以设置服务器端的定时删除?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发基于Firebase的聊天应用程序。我想24小时后自动删除每条消息。 Firebase可以做到吗?如果是的话,怎么样?

预先感谢

解决方案

它集成了自动化。它是实时存储,检索和提供跨设备JSON数据的快捷方式。一个想法是:1.获取用户登录的时间2.比较日期3.向Firebase发送所需的操作。最后,您可以创建一个服务器端或节点代码段,定期联系您的Firebase数据库并执行此类任务。




I'm developing a chat application based on Firebase. I would like to delete automatically every message after 24 hours. Is it possible to do it with Firebase? If yes, how?

Thanks in advance

解决方案

I don't think Firebase purpose it to integrate automatition. It serves as a fast way to store, retrieve and serve JSON data across devices in real time. An idea would be to: 1. get the time the user signed in 2. compare dates 3. send a desired operation to Firebase.

Eventually you can create a server-side or Node snippet that would periodically contact your Firebase database and perform such tasks.

这篇关于Firebase:是否可以设置服务器端的定时删除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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