Skip to content
r.

mongodb-memory-server

typegoose/mongodb-memory-server · Public GitHub repository

Manage & spin up mongodb server binaries with zero(or slight) configuration for tests.

Open project in RepoShelf

Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

mongodb-memory-server live demo screenshot
Captured from the live demo · 2026-11-06

About this project

Author-written excerpt from the project README.

This package spins up an actual/real MongoDB server programmatically from within nodejs, for testing or mocking during development. By default it holds the data in memory. A fresh spun up mongod process takes about 7Mb of memory. The server will allow you to connect your favorite ODM or client library to the MongoDB server and run integration tests isolated from each other.

On install, this package downloads the latest MongoDB binaries and saves them to a cache folder. (only mongodb-memory-server-core does not download on postinstall)

On starting a new instance of the memory server, if the binary cannot be found, it will be auto-downloaded (if RUNTIMEDOWNLOAD option is truthy), thus the first run may take some time. All further runs will be fast, because they will use the downloaded binaries.

Requirements and intended audience

This package spins up an actual/real MongoDB server programmatically from within nodejs, for testing or mocking during development. By default it holds the data in memory. A fresh spun up mongod process takes about 7Mb of memory. The server will allow you to connect your favorite ODM or client library to the MongoDB server and run integration tests isolated from each other.

Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.

Statements extracted from the author’s documentation · Checked 2026-11-05. Source: https://github.com/typegoose/mongodb-memory-server/blob/master/README.md

Recorded maintenance information

Last recorded source update: 2026-11-05. Saved release: v11.3.0 · 2026-09-21. These dates do not guarantee ongoing maintenance.

Technologies
TypeScript
Licence
MIT. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
Demo check
A public page loaded on 2026-11-06. This does not test every feature.

Browse related categories