如何使用 node.js 代码在 Firestore 中创建 Collection

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

我不知道如何使用 node.js firestore api 创建新的 Collection。有什么建议吗?

当您 add/write 向它们发送文档时,会自动创建集合。无需(也 API)显式创建集合。

来自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.