0.2.4 • Published 8 years ago
denali-rethinkdb v0.2.4
denali-rethinkdb
Allows use of RethinkDB as a store for your models.
Installation
- Install this package (
denali install denali-rethinkdb) - Add a 
app/orm-adapters/application.jsthat 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.
 
Configuration
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
};Opinions
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
}Developing
- Clone the repo down
 npm installdenali server- Hit localhost:3000
 
Tests
$ denali test