rs is a zero config mongodb replica set runner
go install github.com/jirevwe/rs
You can download the binary from the releases page
Start a single node replica set running MongoDB 4.2.21
$ rs download
$ rs run
You can download and run different versions of MongoDB
$ rs download 4.2.0
$ rs run 4.2.0
This tool was not designed to be used to run production database replica set. It was designed for local development and testing alone. If you want to run MongoDB in production and don't want to manage a replica set yourself, use MongoDB Atlas.