Skip to content

Instantly share code, notes, and snippets.

@possibilities
Created July 20, 2012 19:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save possibilities/3152731 to your computer and use it in GitHub Desktop.
Save possibilities/3152731 to your computer and use it in GitHub Desktop.
var userCount = 0;
Meteor.publish(null, function() {
userCount++;
this.onStop(function() {
userCount--;
});
});
Meteor.methods({
userCount: function() {
return userCount;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment