@deepstream/storage-rethinkdb
v3.0.0
Published
Connects deepstream.io to rethinkdb
Downloads
101
Readme
deepstream.io-storage-rethinkdb
Deepstream storage connector for RethinkDB
This connector uses the npm rethinkdb package. Please have a look there for detailed options.
Warning: This plugin will automatically create a table, if it doesn't exist yet. But be aware, in case you create a table manually, use "ds_id" as the primary key. Otherwise the plugin won't be able to find your records.
Configuration Options
plugins:
storage:
name: rethinkdb
options:
host: ${RETHINKDB_HOST}
port: ${RETHINKDB_PORT}
db: 'someDb'
defaultTable: 'someTable'
splitChar: '/'
{
//The host that RethinkDb is listening on
host: 'localhost',
//The port that RethinkDb is listening on
port: 28015,
//(Optional) Authentication key for RethinkDb
authKey: 'someString',
//(Optional, defaults to 'deepstream')
db: 'someDb',
//(Optional, defaults to 'deepstream_records')
defaultTable: 'someTable',
/* (Optional) A character that's used as part of the
* record names to split it into a tabel and an id part, e.g.
*
* books/dream-of-the-red-chamber
*
* would create a table called 'books' and store the record under the name
* 'dream-of-the-red-chamber'
*/
splitChar: '/'
}
Basic Setup
const { Deepstream } = require('@deepstream/server')
const server = new Deepstream({
storage: {
name: 'rethinkdb',
options: {
host: 'localhost',
port: 28015
}
},
})
server.start();