MongoDB for VS Code

From Bitpost wiki
Revision as of 14:46, 23 August 2023 by M (talk | contribs) (Created page with "This is a powerful extension from the MongoDB devs, but it is tricky to get up to speed. == Setup == * Install MongoDB for VS Code extension * Create a "playground" folder somewhere (it can find them in your project workspace but to me that's messy) * Open a playground and prime it with something like this: use('my-db'); db.getCollection('my-collection').find() * Save it, and then use Ctrl-P and start typing "playground" to re-open it")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is a powerful extension from the MongoDB devs, but it is tricky to get up to speed.

Setup

  • Install MongoDB for VS Code extension
  • Create a "playground" folder somewhere (it can find them in your project workspace but to me that's messy)
  • Open a playground and prime it with something like this:
use('my-db');
db.getCollection('my-collection').find()
  • Save it, and then use Ctrl-P and start typing "playground" to re-open it