Reputation: 841
I'm working on a Meteor app and I want to add a feature that would say how many people are on the website at a time, similar to omegle.com where it says "38,000+ online now" or whatever. Is this possible with Meteor? If it is, I have no idea how to execute it, and that's why I'm asking it here. Does anybody know how to do this?
Upvotes: 1
Views: 138
Reputation: 19544
You can use presence
package for that purpose, see https://atmospherejs.com/package/presence . It provides the live data on the user state. For example, the easiest way to get the number of online users is:
Presences.find({online: true}).count();
Upvotes: 2