-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NeDB Support #170
Comments
Looks like this might already be possible by passing in a mongoose instance to the options object that is wrapped by NeDB: https://github.com/aerys/mongoose-nedb That package does not seem active/supported though. Hopefully it supports enough of the MongoDB API to be useful. |
I love this idea! It does look like NeDB isn't very actively supported, though it might be worth looking into. Another possible alternative if you just want an in-memory db is https://github.com/nodkz/mongodb-memory-server, though it is mostly meant for testing purposes. You can see it in use in the rest-hapi e2e tests: rest-hapi/tests/e2e/end-to-end.tests.js Line 12 in b069959
|
For my use case, I need persistence (it's for a small, Raspberry-Pi-like device), and data would be streaming in quite frequently. If I can get 2GB of RAM onto the unit I might be confident enough to just use MongoDB directly. Worried about the overhead of MongoDB on one hand, and whether NeDB would be up to the task on the other hand. |
Yeah that makes total sense. Just curious, if you could choose your ideal DB for your application, what would it be? I would like to one day update rest-hapi to support multiple DBs. |
I've mainly used MongoDB and MariaDB/MySQL, but I also really liked RethinkDB before the company went under. I sort of lost hope for it, but it looks like the community has kept it up pretty well though. It has the ability to stream updates to queries in real-time as the database changes, which is really slick. |
Is your feature request related to a problem? Please describe.
For smaller projects where a full mongodb server is overkill, it would be great to use
rest-hapi
with NeDB: https://github.com/louischatriot/nedbDescribe the solution you'd like
Rather than providing a mongo URI, we could pass in an object that maps model name keys to NeDB datastore instances (i.e., mongo collections).
Describe alternatives you've considered
TingoDB, but it appears to be abandoned.
Additional context
I haven't looked in detail yet to see if
rest-hapi
uses any parts of the mongo API that NeDB does not support.If this seems possible, I can help with the code changes.
The text was updated successfully, but these errors were encountered: