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 trialLinda Nixon
Courses Plus Student 1,782 PointsFor Mongo setup, in which folder should this command be executed: -p /data/db
I'm sure I'm missing something extremely obvious here, but I didn't see it mentioned explicitly in the videos.
2 Answers
Sue Dough
35,800 PointsIt would not matter because the first / sends you to the beginning of your OS folder hierarchy no matter where you are. It is the same reason you can
cd /var/
anywhere on your OS because the first slash.
srikarvedantam
8,369 PointsWhich OS are you running?
On Windows, under "C:\" you can execute:
mkdir -p data\db
Alternatively, you can specify custom data directory as below:
mongod --dbpath "<directory path of your choice>"