How to create a Collection in Firestore with node.js code

后端 未结 1 754
失恋的感觉
失恋的感觉 2020-12-02 02:12

I cannot figure out how to create a new Collection with the node.js firestore api. Any suggestions?

相关标签:
1条回答
  • 2020-12-02 02:34

    Collections are automatically created when you add/write a document to them. There is no need (nor API) to explicitly create a collection.

    From the documentation:

    Collections and documents are created implicitly in Cloud Firestore. Simply assign data to a document within a collection. If either the collection or document does not exist, Cloud Firestore creates it.

    0 讨论(0)
提交回复
热议问题