reorganization

This commit is contained in:
Edin Dazdarevic
2015-05-27 19:35:59 +02:00
parent 65c2902dcd
commit 02a556408c
12 changed files with 1 additions and 1 deletions

32
web/confighub.js Normal file
View File

@@ -0,0 +1,32 @@
var Machines = new Mongo.Collection("machines");
if (Meteor.isClient) {
// counter starts at 0
Session.setDefault('counter', 0);
Template.body.helpers({
machines: function() {
return [{hostname: 'machine1'}, {hostname:' machine2'}];
return Machines.find({});
}
});
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
});
}