Mongo-Memory-Sever Options
Information about the started instance
The Current State of this instance
Original Auth Configuration (this.opts can be changed if stopped, but auth cannot be changed here)
General Options for this Instance
Sets or gets the default captureRejection value for all emitters.
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
Get Information about the currently running instance, if it is not running it returns "undefined"
Get Current state of this class
Internal Function to start an instance
Force to use the Same Port, if already an "instanceInfo" exists
Helper function to determine if the "auth" object is set and not to be disabled This function expectes to be run after the auth object has been transformed to a object
"true" when "auth" should be enabled
Remove the defined dbPath
Remove the dbPath even if it is no "tmpDir" (and re-check if tmpDir actually removed it)
Remove the defined dbPath
Set how to run a cleanup, by default { doCleanup: true }
is used
Create the Root user and additional users using the localhost exception This Function assumes "this.opts.auth" is already processed into "this.auth"
Used to get "ip" and "port"
Debug-log with template applied
The Message to log
Ensure that the instance is running -> throws if instance cannot be started
Find a new unlocked port
A User defined default port
Construct Instance Starting Options
Generate the Connection string used by mongodb
add a database into the uri (in mongodb its the auth database, in mongoose its the default database for models)
change the ip in the generated uri, default will otherwise always be "127.0.0.1"
a valid mongo URI, by the definition of https://docs.mongodb.com/manual/reference/connection-string/
Start the Mongod Instance
Force to use the Same Port, if already an "instanceInfo" exists
Change "this._state" to "newState" and emit "stateChange" with "newState"
The new State to set & emit
Stop the current In-Memory Instance
run "this.cleanup"? (remove dbPath & reset "instanceInfo")
Stop the current In-Memory Instance
Set how to run ".cleanup", by default only { doCleanup: true }
is used
Create a Mongo-Memory-Sever Instance that can be awaited
Mongo-Memory-Sever Options
Generated using TypeDoc
Create a Mongo-Memory-Sever Instance