{"id":15616662,"url":"https://github.com/saibotsivad/memgo","last_synced_at":"2026-05-03T06:39:03.564Z","repository":{"id":57687466,"uuid":"489554162","full_name":"saibotsivad/memgo","owner":"saibotsivad","description":"An in-memory MongoDB Data API, useful for integration test suites.","archived":false,"fork":false,"pushed_at":"2022-05-07T03:31:04.000Z","size":64,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T12:33:10.093Z","etag":null,"topics":["data-api","mongodb","mongodb-atlas"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saibotsivad.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-07T03:10:16.000Z","updated_at":"2024-06-11T03:50:38.000Z","dependencies_parsed_at":"2022-08-25T17:53:41.428Z","dependency_job_id":null,"html_url":"https://github.com/saibotsivad/memgo","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saibotsivad%2Fmemgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saibotsivad%2Fmemgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saibotsivad%2Fmemgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saibotsivad%2Fmemgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saibotsivad","download_url":"https://codeload.github.com/saibotsivad/memgo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246201153,"owners_count":20739707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-api","mongodb","mongodb-atlas"],"created_at":"2024-10-03T07:20:40.159Z","updated_at":"2026-05-03T06:38:58.545Z","avatar_url":"https://github.com/saibotsivad.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Memgo\n\nAn in-memory MongoDB Data API, useful for integration test suites.\n\n## Install\n\nThe normal way:\n\n```sh\nnpm install --save-dev memgo\n```\n\n## Using\n\nThis is meant to be used as a CLI tool, so you would start it simply like this:\n\n```sh\n$ memgo\nIn-memory MongoDB instance started at mongodb://127.0.0.1:27017/\n2022-05-07T03:06:21.997Z Data API running on port 3007\n```\n\n## Options\n\nThere aren't many options to configure, just these:\n\n- `apiPort` - The port that the Data API uses. Default: `3007`\n- `mongodbPort` - The port that the in-memory MongoDB instance uses. Default: `27017`\n- `key` - To require an authentication key for the Data API. Set the flag multiple times for multiple keys. Default: no authentication required.\n- `verbose` - Set this flag if the Data API should be more verbose.\n\nHere are some examples:\n\n```sh\n# default ports, but add a key\nmemgo --key battery-horse-staple\n# add multiple keys\nmemgo --key secret1 --key secret2\n# set the data api to a new port\nmemgo --apiPort 5001\n# use mongodb on a different port\nmemgo --mongodbPort 27018\n```\n\n## MongoDB\n\nThe in-memory database is provided by the excellent [mongodb-memory-server](https://github.com/nodkz/mongodb-memory-server) library.\n\nFrom their documentation:\n\n\u003e 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.\n\u003e\n\u003e 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)\n\n## Data API\n\nThe official [MongoDB Atlas Data API](https://www.mongodb.com/docs/atlas/api/data-api/) is mocked using the [mongodb-local-data-api](https://github.com/saibotsivad/mongodb-local-data-api) library, which attempts to match it as exactly as possible.\n\n## License\n\nPublished and released under the [Very Open License](http://veryopenlicense.com).\n\nIf you need a commercial license, [contact me here](https://davistobias.com/license?software=memgo).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaibotsivad%2Fmemgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaibotsivad%2Fmemgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaibotsivad%2Fmemgo/lists"}