Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coderofsalvation/mongodb-filebased
mongodb without mongodb (but stores into jsonfile)
https://github.com/coderofsalvation/mongodb-filebased
Last synced: 12 days ago
JSON representation
mongodb without mongodb (but stores into jsonfile)
- Host: GitHub
- URL: https://github.com/coderofsalvation/mongodb-filebased
- Owner: coderofsalvation
- License: other
- Created: 2017-02-11T16:07:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-04T03:40:23.000Z (about 4 years ago)
- Last Synced: 2024-09-18T00:48:31.799Z (about 2 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
zero-complexity flat-filebased mongodb replacement, no need to run mongodb instance
[![CircleCI](https://circleci.com/gh/coderofsalvation/mongodb-filebased.svg?style=svg)](https://circleci.com/gh/coderofsalvation/mongodb-filebased)
## Usage
Just wrap your mongo-stuff like this, and it'll redirect all mongodb data to a `mongodb.js` file:
require('mongodb-filebased')(function(){
require('mongodb')
// do your stuff})
> NOTE: this is not a full implementation of mongodb, but it 'seems' to work for
most mongoose/mongodb CRUD cases.## Features
* no need for mongodb installation
* store all collections in databasefile
* default databasefile is `mongodb.js` (or environment var `MONGO_DB_FILE`)
* switch to real mongodb by just commenting the magic line
* handy for quick prototyping / testing