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

Viewed 15740

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

1 Answers

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.

Related