How would I run server-side code in Firebase?

后端 未结 3 1022
长发绾君心
长发绾君心 2020-12-05 05:24

I have a function where I want to perform some server-side validations, but I\"m not sure how to do this? Any suggestions where I should look. THere is nothing in the docu

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-05 05:47

    Pattern 2 in this blog article might help. https://firebase.googleblog.com/2013/03/where-does-firebase-fit-in-your-app.html

    In this architecture, Firebase sits between the server and clients. Your servers can connect to Firebase and interact with the data just like any other client would. In other words, your server communicates with clients by manipulating data in Firebase. Our Security and Firebase Rules language lets you assign full access to your data to your server. Your server code can then listen for any changes to data made by clients, and respond appropriately.

提交回复
热议问题