Closing a gap in Mongo utility
For the past year I’ve been a Project Delivery Lead, which was a role with many hats. One of the hats involved managing an offshore team of DBAs, writing JavaScript queries for MongoDB.
I don’t know how they were trained, but their IDE of choice was Notepad2, their code review methodology involved mailing random js files, and synchronous WebEx chats. Given the time difference, this was problematic.
Given this challenge, I resolved to fix it with modern technology, and Visual Studio Code! Visual studio code made code formatting a snap, it had git integration, so I could start using Pull Requests to manage syntax highlighting, I could add in a JavaScript linter, and I could write my own plugin to integrate the Mongo shell into the Code editor itself.
Now, I have a chance to help everyone else who has to deal with mongo queries using the best tool available. I present to you MongoGO! A code plugin to integrate the mongo shell on windows into your code editor!
The “Mongo Shell” command uses you settings to launch the mongo client:
It’s a fully interactive shell, launched with the arguments specified in the workspace configuration file, getting around code bug 8429.
From there, you can use the context menu “Run Selection in Mongo” to send the highlighted text to the shell. Here’s an example of a manual cursor driven by JavaScript in the mongo shell:
That’s the gist of it. Hopefully with this DBA’s can write cleanerode and test it from within the editor, instead of saving it to a random text file and running the shell manually.