mongodb - Meteor + existing mongo : Data added through GUI not visible in database -


i'm trying use existing mongo instance meteor app (example simple-todos app form submission).

simple-todos.html

<head>   <title>todo list</title> </head>  <body>   <div class="container">     <header>       <h1>todo list</h1>        <form class="new-task">         <input type="text" name="text" placeholder="type add new tasks" />       </form>      </header>      <ul>       {{#each tasks}}         {{> task}}       {{/each}}     </ul>   </div> </body>  <template name="task">   <li>{{text}}</li> </template> 

simple-todos.js

tasks = new mongo.collection("tasks");  if (meteor.isclient) {   // code runs on client   meteor.subscribe("tasks-broadcast");    template.body.helpers({     tasks: function(){         return tasks.find();     }   });    template.body.events({     "submit .new-task": function (event) {       // prevent default browser form submit       event.preventdefault();        // value form element       var text = event.target.text.value;        // insert task collection       tasks.insert({         text: text,         createdat: new date() // current time       });        // clear form       event.target.text.value = "";     }   });  }  if (meteor.isserver) {   meteor.startup(function () {     // code run on server @ startup     meteor.publish("tasks-broadcast", function() {       return tasks.find({},{ sort: { timestamp:-1}, limit: 20});     });   }); } 

i have reset mongo_url path using :

export mongo_url=mongodb://localhost:27017/simple-todos 

when submit item client, todo list updates on clients. data being added , retrieved properly. however, when check mongo instance running through terminal, don't see collection tasks there. clueless data getting persisted. , how can confirm if data going local mongo?

please help, thanks.

edit : application not running on local mongo. when meteor mongo in project folder this

mongo: meteor isn't running local mongodb server.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -