UNPKG

ickyrr-gagarin

Version:

A current updated fork of gagarin

24 lines (20 loc) 517 B
if (Meteor.isClient) { // XXX the colon at the end of this line should prevent build Session.setDefault("counter", 0): Template.hello.helpers({ counter: function () { return Session.get("counter"); } }); Template.hello.events({ 'click button': function () { // increment the counter when button is clicked Session.set("counter", Session.get("counter") + 1); } }); } if (Meteor.isServer) { Meteor.startup(function () { // code to run on server at startup }); }