Welcome to the Treehouse Community
Looking to learn something new?
what if we didnt install with homebrew?
i am on a windows machine so i couldnt use homebrew. how would i run the mongob and mongo command from my project folder opposed to the bin folder? i tried cd and a relative path all the way to mongo and it still didnt work. when i run it from my bin and i run ls() in mongo shell i see all the files in bin not my project folder. how would i start the shell in my project folder in windows?
Making Mongo available from everywhere
If i got you right you want to execute mongo (mongod, mongodump, ...) in Windows from everywhere in your file system. To do so you have to add the path to your bin folder to the windows PATH environment variable.
To permanently set the environment variable on windows follow the detailed step by step instruction on SO from MatPag.
In Step 9 of the instruction you have to add your path to the bin folder of the mongo installation. After changing the
PATH environment variable (and saving the changes in the control panel) don't forget to restart your machine.
Start the mongo server from where ever you want with
Go into your project folder, where you can now run
to start a mongo shell session. Here you can load the seed script via
from with in the mongo shell.
don't run mongo directly from the folder, just add it to the path and you can execute mongo and mongod just typing it.