Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases

Sean Pascoe
Sean Pascoe
17,151 Points

Windows: Add mongodb directory to PATH environmental variable for easy command line interaction

Huston talks about having to use the full directory paths to start mongo and such. If you're on windows you can just add the mongodb directory to the PATH (i.e. "C:\Program Files\MongoDB\Server\3.2\bin"). Then you can just use the commands as he does with the "Homebrew installation method."

1 Answer

jason chan
jason chan
31,009 Points

here is a tutorial on how to install mongodb on windows. It includes the path tutorial

https://youtu.be/1uFY60CESlM

Happy hacking. ;)

make sure to run two different terminals

one terminal for mongod
one terminal for mongo

You only need to run mongod for the server though. mongo terminal is the client so you can go in and type in commands like db.databasename.find({name: 'Richard'})