Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Portable MongoDB? [closed]

I have been wondering if it is possible to have a portable MongoDB instance.

My goal is making a full Javascript + HTML5 application, and store data in a /data folder, and each collection would be a .json file, but hardcoding a literal database would be certainly reinventing the wheel (or steel).

I googled some Javascript-made JSON databases as a reference, but my eyes shine on BSON data formats.

Is that possible? Or better, am I missing another mind-breaking technology that would fit my needs?

Thanks!

like image 455
ViniciusPires Avatar asked Oct 14 '12 22:10

ViniciusPires


People also ask

Is MongoDB portable?

There isn't a "portable" MongoDB instance available. Using local storage would be a good approach if you want to keep everything contained in the JS application.


2 Answers

Disclaimer: I just came across this and haven't tried it yet. MongloDB (https://github.com/Monglo/MongloDB) looks interesting. From my quick look it appears to be a MongoDB look alike interface that makes it easy to back with local storage or a cache and AJAX to a server side store. But as I say I have not tried it yet. The joys of random github finds.

like image 84
Matthew Nichols Avatar answered Oct 05 '22 14:10

Matthew Nichols


I created NeDB - a pure Javascript database implementing the MongoDB API. It can be used as a Node.js module and in the browser and supports persistence.

It also supports indexes which make it much faster than databases who don't (e.g. TaffyDB and it seems to be the case for MongloDB as well)

like image 33
Louis Chatriot Avatar answered Oct 05 '22 14:10

Louis Chatriot