Skip to content

Adds instructions for error messages #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,25 @@
## Course
Thanks for taking the Intro to MongoDB course, created by Scott Moss & Frontend Masters. This course aims to cover a wide intro into using MongoDb with Nodejs. Topics refrain from going deep, but instead, focus on a wide view.
## Excercises
Note: To handle the error "MongoError: E11000 duplicate key error collection" by dropping the database
```bash
mongo
use dbName;
db.dropDatabase();
exit
```
(dbName is the name of the database)

### Installing MongoDB
Ther are many ways to install MongoDB. [The offical website](https://www.mongodb.com/download-center#community) has you covered either way. After installation, you might have to add a `dbPath`, a location where mongodb saves your data. You can do so like this.
There are many ways to install MongoDB. [The offical website](https://www.mongodb.com/download-center#community) has you covered either way. After installation, you might have to add a `dbPath`, a location where mongodb saves your data. You can do so like this.
```bash
mkdir -p /data/db
```
Note: If you have an error like "data directory not found" or "permission denied" while installing MongoDB:
```bash
sudo mkdir /data/db
sudo chown -R $USER /data/db
```
### Models
* location - `exercises/models`
* commands
Expand Down