Allows use of RethinkDB as a store for your models.
- Install this package (
denali install denali-rethinkdb
) - Add a
app/orm-adapters/application.js
that extends this adapter.
import RethinkdbAdapter from 'denali-rethinkdb/app/orm-adapters/rethinkdb';
export default RethinkdbAdapter;
- Make sure your models (if any) have their attributes defined with the attributes that this adapter defines.
The configuration can be updated in config/environment.js
.
It would look something like:
config.database = {
config: {
host: 'localhost',
port: 28015,
db: 'test'
},
autoCreateTables: true
};
Currently, this adapter converts model names into plural table names.
export default class Issue extends Model {
static createdAt = attr('date'); // maps to the issued table and createdAt column
}
- Clone the repo down
npm install
denali server
- Hit localhost:3000
$ denali test