mongodb-memory-server icon indicating copy to clipboard operation
mongodb-memory-server copied to clipboard

Change `forceSamePort` parameter to also be a config option

Open hasezoey opened this issue 2 years ago • 0 comments

Currently forceSamePort can only be set via the MongoMemoryServer.start parameter, and is currently unavailable for .create or replsets, this issue tracks to add some kind of option to InstanceOpts to force the same port.

Note about semantics: it will work the same as forceSamePort, where the parameter takes priority. if set to true and port is defined, it will not generate a port, port is undefined, it will generate a port regardless.

hasezoey avatar Oct 18 '23 13:10 hasezoey