All Projects → SocketCluster → sc-crud-rethink

SocketCluster / sc-crud-rethink

Licence: other
Realtime CRUD data management layer/plugin for SocketCluster using RethinkDB as the database

Programming Languages

javascript
184084 projects - #8 most used programming language

sc-crud-rethink

Realtime CRUD data management layer/plugin for SocketCluster using RethinkDB as the database.

See https://github.com/socketcluster/sc-sample-inventory for a full working sample.

Setup

See https://github.com/socketcluster/sc-sample-inventory for sample app which demonstrates this component in action.

This module is a plugin for SocketCluster, so you need to have SC installed: http://socketcluster.io/#!/docs/getting-started Once SC is installed and you have created a new SC project, you should navigate to your project's main directory and run:

npm install sc-crud-rethink --save

Now you will need to attach the plugin to your worker - So open worker.js and attach it to your worker instance like this: https://github.com/SocketCluster/sc-sample-inventory/blob/e0628b312642faa60c604a27f5eb2bfbd4231e24/worker.js#L121

As shown in the sample above, you will need to provide a schema for your data. In the example above, the Category, Product, and User keys represent tables/models within RethinkDB - Inside each of these, you need to declare what fields are allowed and optionally the views which are supported for each model type.

Simply put, a view is an ordered, filtered subset of all documents within a table. Views need to define a filter and/or order function which will be used to construct the view for table's data.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].