What have with my Meteor and Mongo?


#1

The meteor does not display the index.html which it was inserted in the “meteor mongoDB”, nothing appears in the body index.html …
My code is the basic boot, follow my code:

index.html

<head></head>
<body>
    <h3>TESTE</h3>
    {{> lista}}
</body>

lista.html

<template name="lista">
    <ul>
        {{#each tarefas}}
        <li>{nome}</li>
        {{/each}}
    </ul>
</template>

lista.js

Template.lista.helpers({

    tarefas : function(){
        return Tarefas.find({});
    }
});

tarefas.js

Tarefas = new Mongo.Collection("tarefas");

IMGS:

http://ap.imagensbrasil.org/image/pwAUR3

http://ap.imagensbrasil.org/image/pwAbzH


#2

The solution is to create and subscribe to a publication which “emits” those documents to the server, or have a method call that does that.

Give this a read: https://www.discovermeteor.com/blog/understanding-meteor-publications-and-subscriptions/
Then look at this: https://docs.meteor.com/api/pubsub.html

Summary: as the server you need to publish the data you want the client to see. Then as a client you need to subscribe to that data, otherwise your collections will be empty!


#3

What I ended up doing, which is the “basic” is not working. That I always did in all versions of meteor and never gave problem it is only happening now when I did the update for Meteor 1.4 and 3.2 mongodb