Skip to content

Commit 4b26d7b

Browse files
authored
Merge pull request #3 from laniehei/master
Adds instructions for error messages
2 parents 148430f + 70c7735 commit 4b26d7b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

+15-1
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,25 @@
1919
## Course
2020
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.
2121
## Excercises
22+
Note: To handle the error "MongoError: E11000 duplicate key error collection" by dropping the database
23+
```bash
24+
mongo
25+
use dbName;
26+
db.dropDatabase();
27+
exit
28+
```
29+
(dbName is the name of the database)
30+
2231
### Installing MongoDB
23-
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.
32+
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.
2433
```bash
2534
mkdir -p /data/db
2635
```
36+
Note: If you have an error like "data directory not found" or "permission denied" while installing MongoDB:
37+
```bash
38+
sudo mkdir /data/db
39+
sudo chown -R $USER /data/db
40+
```
2741
### Models
2842
* location - `exercises/models`
2943
* commands

0 commit comments

Comments
 (0)