DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Meteor MongoDB Notes


  • Connect to a mongodb of a Meteor app: run meteor at the project root. Start another shell, go to this folder, and run meteor mongo;

  • List all available commands: help;

  • List DB operation methods: db.help();

  • List all existing collection names: show collections;

  • List all available commands of a collection: db.<collection-name>.help();

  • Show collection information: db.<collection-name>.stats();

  • Print all "name" field of collection "fairs": db.fairs.find({}, {name_chn: 1});

  • Print all fields except "name_chn" of collection "fairs": db.fairs.find({}, {products: 0});



Published

Dec 20, 2014

Last Updated

Dec 20, 2014

Category

Tech

Tags

  • meteor 47
  • mongodb 24

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor