且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Firebase功能:可以将功能分成多个项目

更新时间:2023-02-27 11:09:27

It depends on what kinds of functions you're writing.

If you want to write database triggers, they have to be in the same project as the database that's receiving the writes. You can't have a second project respond to writes from the database in the first project.

If you want to write HTTP triggers, you can init the admin SDK to point to different projects for querying and such.

I don't particularly see any need to "shard" your functions like this in a production environment. Cloud Functions will scale your functions as needed to handle the load, and having different functions in different projects shouldn't make a difference in that respect.

相关阅读

技术问答最新文章