ABC
ABC

Reputation: 1467

How to detect if a new collection has been created?

I use collection hooks to see if a new document has been inserted into a collection or if an existing one has been modified.

But is there any way to detect (within Meteor) if I've created a new collection or removed a collection?

I'm thinking of an interval using https://github.com/dburles/mongo-collection-instances: Mongo.Collection.getAll() // returns a list of all collections Is there any better way than this? Like a collection created/deleted event?

Upvotes: 2

Views: 161

Answers (1)

Meena
Meena

Reputation: 97

How to detect if a new collection has been created?

Terminal Command For list Collections in Mongodb:

show collections or show tables

Upvotes: 1

Related Questions