lungo
A MongoDB compatible embeddable database and toolkit for Go. (by 256dpi)
mongodb-memory-server
Spinning up mongod in memory for fast tests. If you run tests in parallel this lib helps to spin up dedicated mongodb servers for every test file in MacOS, *nix, Windows or CI environments (in most cases with zero-config). (by nodkz)
Our great sponsors
lungo | mongodb-memory-server | |
---|---|---|
2 | 9 | |
448 | 2,454 | |
- | - | |
5.0 | 9.3 | |
about 1 month ago | 9 days ago | |
Go | TypeScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
lungo
Posts with mentions or reviews of lungo.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-04-20.
- Show HN: Mongita is to MongoDB as SQLite is to SQL
-
An Unlikely Database Migration
I found myself in a similar situation sometime ago with MongoDB. In one project my unit tests started slowing me down too much to be productive. In another, I had so little data that running a server alongside it was a waste of resources. I invested a couple of weeks in developing a SQLite type of library[1] for Go that implemented the official Go drivers API with a small wrapper to select between the two. Up until now, it paid huge dividends in both projects ongoing simplicity and was totally worth the investment.
[1]: https://github.com/256dpi/lungo
mongodb-memory-server
Posts with mentions or reviews of mongodb-memory-server.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-10-13.
-
How to test nestjs modules?
In the case of MongoDB there's jest-mongodb that use mongodb-memory-server; for other DBMS, I don't know if it's possible to run an instance in memory.
-
My first project, a Dev.to clone built with MongoDB, Express, React, and Socket.io
The only thing really messing is tests. At work we use https://github.com/nodkz/mongodb-memory-server
-
How to write tests for applications that use MongoDB as a storage
The final method tries to combine both methods, 1 and 2. It uses an external package MongoDB In-Memory Server for our MongoDB.
-
How to test mongoose models with jest and mockingoose
The above test is clear and easy to understand, but the reality is that, while this can be applied to a lot of cases, things get very complicated when you have to start to mock things like dependencies, API calls, etc... And one very tricky case is when you have to test a function that invoke some models from an ODM like Mongoose, like doing some CRUD operations against a database. In some cases a solution could be to use an actual test database, so you don't mock anything but you use real data. The only problem with that is that is assuming that you must have a database at your disposal to run unit tests, and that's not always possible, plus you have to clean the database, and a pletora of other problems. Another solution could be to use a database that lives only in memory and only for the duration of your tests, like the excellent mongodb-memory-server package. But while this will work most of the times, if you deploy your code on any CI/CD you might encounter problems (and I did!). Also a key factor of unit testing, is that you shouldn't rely on external services run them, unlike E2E tests for example. What you should do is to mock most of the dependencies you need, as your goal is to just test the function and no deeper than that.
- Show HN: Mongita is to MongoDB as SQLite is to SQL
-
Setup in-memory database for testing Node.js and Mongoose
I've been working on creating an application using Node.js and Mongoose where all data stored in the cloud MongoDB Atlas. My goal was to test API endpoints and write some unit tests, for that I found this package called mongodb-memory-server, which allows me to create a connection to the MongoDB server from my cache folder without a need to use cloud test database or installing mongodb client.
-
Testing with MongoDB-Memory-Server
In both articles, the authors refer to nodkz's mongodb-memory-server package.
-
MongoDB Animated: Adding and removing elements from arrays
mongodb-memory-server package by @nodkz
-
In memory mongoDB for testing
There are a whole lot of configuration options for you to explore with this package here -> https://github.com/nodkz/mongodb-memory-server
What are some alternatives?
When comparing lungo and mongodb-memory-server you can also consider the following projects:
mongita - "Mongita is to MongoDB as SQLite is to SQL"
mongodb-jest-testing - Tests with jest and mongodb
indradb - A graph database written in rust
Docker Compose - Define and run multi-container applications with Docker
go-memdb - Golang in-memory database built on immutable radix trees
sortedcontainers - Python Sorted Container Types: Sorted List, Sorted Dict, and Sorted Set
lua-mongo - MongoDB Driver for Lua
SQLBoiler - Generate a Go ORM tailored to your database schema.
apollo-mongoose-plugin - Apollo GraphQL plugin to add MongoDB query information on the extensions node
lungo vs mongita
mongodb-memory-server vs mongodb-jest-testing
lungo vs indradb
mongodb-memory-server vs Docker Compose
lungo vs go-memdb
mongodb-memory-server vs indradb
lungo vs sortedcontainers
mongodb-memory-server vs mongita
lungo vs lua-mongo
mongodb-memory-server vs sortedcontainers
lungo vs SQLBoiler
mongodb-memory-server vs apollo-mongoose-plugin