DB agnostic or rethinkDB support
rfx-stack requires mongoose, and I am using feathers-rethinkdb; prefer a single DB. Enhancement supporting a flexible DB or add'l DBs would extend rfx-stack and reduce dependencies. Thanks
I used mongo as demo. Because Feathers already supports more dbs out of the box you can change the implementation easly. For example, If you want to use rethinkdb, remove all the mongo dependencies first, then:
- use the
feathers-rethinkdbin/api/server.jsinstead offeathers-mongoosehttps://github.com/foxhound87/rfx-stack/blob/master/src/api/server.js - in the
/api/connector.jsyou should implementrethinkdbdash(instead ofmongoose) passing to it the configs. https://github.com/foxhound87/rfx-stack/blob/master/src/api/connector.js - in the
/api/autoloader.jschange the implementation here https://github.com/foxhound87/rfx-stack/blob/master/src/api/autoloader.js#L12 extending theServiceConfigand passing the rethinkdb adapter to itsModelproperty (rethinkdbdashwill bethis.adapterin your case).
You should remove the models because rethinkdbdash doesn't support a model schema.
Consider using something like thinky if you want models: https://thinky.io
I will create a detailed guide.
You can follow the feathers database doc for more info on how to implement rethinkdb: http://docs.feathersjs.com/databases/rethinkdb.html
A detailed guide will be great. Thank you! 💃
+1 for DB agnostic solution guide. Personally I would like to use this stack with NeDB (as it is a pure JS solution and no binaries required) and I'm stuck now understanding all the mongo dependencies implemented.
+1. The example should include minimal dependencies, so I'd go with NeDB. It sucks having to strip out Mongo.
@chriswessels I hope this can help you. https://github.com/Weifeng-Ying/rfx-stack-NeDB/commit/ff30437a0d825b74b2b471ad67042a1cddfca85e