Makes it obvious how to run mongo-hacker #218
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Adds
mongo
to 2 places in the READMEWhy
I haven't used mongo-hacker for a few years, so I forgot how to run it. For whatever reason I assumed that it runs as it's own shell app.
Reading the README, it wasn't obvious to me.
I spent about 15 mins trying to figure it out, going into ~/.nvm/versions/node/v17.2.0/lib/node_modules/mongo-hacker and trying to run the js files with node haha.
I thought maybe because it hasn't been updated since 2019 (around the time of Mongo 3.4 apparently, and now we're on Mongo 5) that it was probably old and broken.
I was getting print() not defined, and _isWindows not defined etc. i tried hacking the JS and adding in
const print = console.log;
andconst _isWindows = () => false;
etc hahahaThen finally I checked the make file and noticed it updates .mongorc then I looked at .mongorc etc and realized it probably runs inside
mongo
I think 2 lines would save many people the trouble of wondering how to run it.