Meteor on a Nitrous box: how to add a test record in the MongoDB database?

StackOverflow https://stackoverflow.com/questions/23323839

  •  10-07-2023
  •  | 
  •  

Вопрос

So, I have started to test Meteor on a Nitrous.io box in the cloud. I used to enter a test record by typing it directly into the Chrome browser console, like:

Projects.insert({name:'First Project',client:'Project Central',duedate:new Date(),status:'On Hold'});

However, that does not work on Nitrous. So, how do I add a test record in my meteor collection to work on?

Who can help me in the right direction? Much appreciated.

Это было полезно?

Решение

After you run meteor run in a Nitrous.io console,

open up another console and run meteor mongo.

Then you can type in a db.Projects.insert(...) or other mongoDB command.

Другие советы

There might be the case if you removed insecure package, insert will not work from browser client.

Check if the 'insecure' package installed or not using following command

meteor list --using

which will list the packages which are used by the meteor app.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top