moleculer-db-adapter-rethinkdb
RethinkDB adapter for Moleculer DB service.
Install
$ npm install moleculer-db moleculer-db-adapter-rethinkdb --save
Usage
"use strict"; const ServiceBroker = ;const DbService = ;const RethinkDBAdapter = ; const broker = ; // Create a RethinkDB service for `post` entitiesbroker; brokerstart// Create a new post // Get all posts; // Change feedsconst client: conn = thisschemaadapter;// Lets get a rethinkdb.table instanceconst rTable = thisschemaadapter;// You can also get a rethinkdb instance with below// const rethinkdb = this.schema.adapter.getR(); rTable; // Map Reduce with same wayrTable; // You can access all underlying API
Options
Example with connection options
host: "localhost" port: 29015
Above options is used as default when you dont specify any option or pass empty
Test
$ npm test
In development with watching
$ npm run ci
License
The project is available under the MIT license.