clarify in README that replication is required for autoincrementing IDs
This commit is contained in:
parent
1c18fc2bf6
commit
325534a7d0
14
README.md
14
README.md
@ -20,6 +20,20 @@ package tutorial
|
||||
import "rockfic.com/orm"
|
||||
```
|
||||
|
||||
## Convert your database to a replica set (if you haven't already)
|
||||
|
||||
this is **very important!!** otherwise, functionality like
|
||||
auto-incrementing IDs will not be available.
|
||||
|
||||
add these lines to `mongod.conf`:
|
||||
|
||||
```
|
||||
replication:
|
||||
replSetName: "rs0"
|
||||
```
|
||||
|
||||
of course, you can replace `rs0` with whatever name you want.
|
||||
|
||||
## Connect to the database
|
||||
|
||||
```go
|
||||
|
Loading…
x
Reference in New Issue
Block a user