Skip to content

Instantly share code, notes, and snippets.

View sanatcodes's full-sized avatar
Building cool stuff

Sanat sanatcodes

Building cool stuff
View GitHub Profile
@sanatcodes
sanatcodes / gist:874d69b36f9a81aa1487b5770598ebdb
Last active April 24, 2025 08:25
Setup MongoDB replica set on local host with only a single primary - For Apple Silicon
Add the `replication` section to the mongod.conf file:
```
$cat /opt/homebrew/etc/mongod.conf
systemLog:
destination: file
path: /opt/homebrew/var/log/mongodb/mongo.log
logAppend: true
storage:
dbPath: /opt/homebrew/var/mongodb