Mongodb local file storage using nedb for nodejs
-
Hi, I love the simplicity and responsiveness of nodebb and I'm interested in using the forum for a very small community/project. If I don't want to run a full on mongodb server, could it be possible to use something like NEDB which acts just like mongodb with same methods, but can save and persist the database as a local file. I am considering this approach due to shared hosting and I understand you strongly discourage such use but it's what I have to work with and the project is very small. Just would like your thoughts before I waste a bunch of time going down that path. Thanks
-
@sinisterspatula The repository you linked to appears to be no longer maintained ?
WARNING: this library is no longer maintained, and may have bugs and security issues. Feel free to fork but no pull request or security alert will be answered.
-
@phenomlab yes, NEDB is no longer maintained, I haven't found a replacement for it yet, but, I've used it recently to develop a chrome extension and it worked 100% without issues for me. I could look for another mongodb replacement that has persistent file storage. Doing some more research about this I guess it's not as simple as I was thinking, I guess there can be issues with "mongo api level". I found Tingodb which I think is still active, and supports mongo api 1.4... shoot nevermind, it looks like that one is abandoned too. Guessing this is just not feasible and I'd need a real mongodb server.
-
@sinisterspatula Probably, yes.
The thing is, we don't interface with MongoDB directly. We use an abstraction layer, and so if your database of choice supports all of the commands we throw at it (you can see the abstraction layer methods in
src/database/*
), then NodeBB can theoretically support it.