Surprise! We've been running on hardware provided by BuyVM for a few months and wanted to show them a little appreciation.
Running a paste site comes with unique challenges, ones that aren't always obvious and hard to control. As such, BuyVM offered us a home where we could worry less about the hosting side of things and focus on maintaining a clean and useful service! Go check them out and show them some love!
Submitted on May 25, 2015 at 04:28 AM

Section 1 (JavaScript)

if (Meteor.isClient) {

Meteor.subscribe('users');

Template.hello.events({
  'click #button': function () {
    var userId = Meteor.userId();
    Meteor.call('scored', userId, {$set: { score: 1 }});
  }
});

}

if (Meteor.isServer) {

  Meteor.publish('users', function() {
        return Meteor.users.find();
    });

  Accounts.onCreateUser(function(options, user) {
    user.score = 0;
    if (options.profile) {
      user.profile = options.profile;
    }
    return user;
  });

  Meteor.methods({
    scored: function (userId, score) {
      Meteor.users.update(userId, score);
    }
  });
}