Skip to content

Instantly share code, notes, and snippets.

@denzhel
Created March 4, 2022 14:19
Show Gist options
  • Select an option

  • Save denzhel/7274a354519e17eda7a52d79db190f1a to your computer and use it in GitHub Desktop.

Select an option

Save denzhel/7274a354519e17eda7a52d79db190f1a to your computer and use it in GitHub Desktop.
MongoDB one node replica set

To configure a replica set with only one node, run the following:

rs.reconfig({_id: "mongo",version: 1,members: [{ _id: 0, host : "HOSTNAME:27017" }]},{force:true})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment