A
A
Alexander Wolf2015-11-10 01:01:27
MongoDB
Alexander Wolf, 2015-11-10 01:01:27

Observe collection meteor fired on initialization?

Good evening! On the server I use this:

Meteor.startup(function() {
  Meteor.users.find().observe({
    added(document) {
      console.log(document);
    }
  });
});

And so at application start I receive X records at once. I would make it so that the callback only fires when records are added to the collection, skipping initialization.
I think to add Timeout, but, IMHO, a crutch.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Wolf, 2015-11-10
@mannaro

Found a solution on SO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question