Access Meteor Collections from MongoDB Issue? -


I made & amp; Deploy an app using Meteorite Deploying the name myapp.meteor.com I am using the following process from Mongo DB :

Command prompt from meteorite:

  Inverted Mongolia myapp.meteor.com // Below is a meteoric response to myapp.meteor.com Order MongoDB shell version: 2.4. 8 Connect to: output-db-b3.meteor.io_7017 / myapp_meteor_com   

Command prompt from MongoDB:

  Use myapp_meteor_com  < / Pre> 

I received my message Using e Emp is designed collection. Mongo DB I will try to see this from the command prompt but the collection is made from myapp but it is not visible. And I am using the process below to show the collection:

  Connect to: test & gt; Show dbs myapp_meteor_com (empty) local 0.078125GB> Myapp_meteor_com using db myapp_meteor_com & gt; The show archive // ​​does not show anything here, but the 'amp collection' in the JS file and data is as shown below. & Gt; // No collection is shown here   

So I had no idea, please suggest me what to do for the above problem?

// Here the data collected on the AMP collection obj. JS code:

  if (metire server) {meteor. Startup (function () (; if (Emp.find). Count () === 0) {for (var i = 0; i & lt; 10; i ++) amp.inert ({fname: "xxx" , User ID: i, Email: "abc@gmail.com"});}}); }    

You created the archive using Emp = new Meteor.Collection ("Emp") (if you did that).

The thing is that the collection will be made only if you insert data into them if you create an archive in the above manner, you have declared it as only a variable and the collection is mongodb Will not show in.

How it usually works mongodb: The archive is automatically created when you insert data into them.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -