So I tried my first little app with Meteor today, and it works fine on localhost, but once I deploy it to meteor.com, I only see the first two headers, and nothing else. I get no errors either, so I’m not sure what to do. Please help me! I’m new to Meteor and the fate of the world hangs on getting this app to work. http://animalcontest.meteor.com
Animal VoteYou decide. Which animals are the best?
click as many times as you like to change the scores
{{#each winnerlist}} {{> winner }} {{/each}} {{#each catslist}} {{> cats }} {{/each}} {{#each dogslist}} {{> dogs }} {{/each}} {{#each elephantslist}} {{> elephants }} {{/each}} {{#each hyenaslist}} {{> hyenas }} {{/each}} {{#each bananaslist}} {{> bananas }} {{/each}}The current winner is: {{animal}}
current score: {{score}}cats
current score: {{score}}
dogs
current score: {{score}}
elephants
current score: {{score}}
hyenas
current score: {{score}}
bananas
current score: {{score}}
here’s the javascript
Animals = new Mongo.Collection(‘Animals’);
console.log(“Hello World from Meteor!”);
if(Meteor.isClient){
Template.body.helpers({
‘winnerlist’: function(){
return Animals.find({}, {sort: {score: -1},limit:1 });
},
'catslist': function(){
return Animals.find({animal:"cats"});
},
'dogslist': function(){
return Animals.find({animal:"dogs"});
},
'elephantslist': function(){
return Animals.find({animal:"elephants"});
},
'hyenaslist': function(){
return Animals.find({animal:"hyenas"});
},
'bananaslist': function(){
return Animals.find({animal:"bananas"});
}
});
Template.cats.events({
'click .c-increment': function() {
Animals.update(this._id, {$inc: {score: 5} });
},
'click .c-decrement': function() {
Animals.update(this._id, {$inc: {score: -5} });
}
});
Template.dogs.events({
'click .d-increment': function() {
Animals.update(this._id, {$inc: {score: 5} });
},
'click .d-decrement': function() {
Animals.update(this._id, {$inc: {score: -5} });
}
});
Template.elephants.events({
'click .e-increment': function() {
Animals.update(this._id, {$inc: {score: 5} });
},
'click .e-decrement': function() {
Animals.update(this._id, {$inc: {score: -5} });
}
});
Template.hyenas.events({
'click .h-increment': function() {
Animals.update(this._id, {$inc: {score: 5} });
},
'click .h-decrement': function() {
Animals.update(this._id, {$inc: {score: -5} });
}
});
Template.bananas.events({
'click .b-increment': function() {
Animals.update(this._id, {$inc: {score: 5} });
},
'click .b-decrement': function() {
Animals.update(this._id, {$inc: {score: -5} });
}
});
}