Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/knownasilya/denali-rethinkdb
RethinkDB adapter for the Denali node framework
https://github.com/knownasilya/denali-rethinkdb
adapter denali denali-addon nodejs rethinkdb
Last synced: 14 days ago
JSON representation
RethinkDB adapter for the Denali node framework
- Host: GitHub
- URL: https://github.com/knownasilya/denali-rethinkdb
- Owner: knownasilya
- License: mit
- Created: 2017-06-12T15:07:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-02T15:00:56.000Z (over 7 years ago)
- Last Synced: 2024-11-01T11:34:35.970Z (2 months ago)
- Topics: adapter, denali, denali-addon, nodejs, rethinkdb
- Language: JavaScript
- Size: 104 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# denali-rethinkdb
Allows use of [RethinkDB](https://www.rethinkdb.com) as a store for your models.
## Installation
1. Install this package (`denali install denali-rethinkdb`)
2. Add a `app/orm-adapters/application.js` that extends this adapter.```js
import RethinkdbAdapter from 'denali-rethinkdb/app/orm-adapters/rethinkdb';export default RethinkdbAdapter;
```3. 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:
```js
config.database = {
config: {
host: 'localhost',
port: 28015,
db: 'test'
},
autoCreateTables: true
};
```## Opinions
Currently, this adapter converts model names into plural table names.
```js
export default class Issue extends Model {static createdAt = attr('date'); // maps to the issued table and createdAt column
}
```## Developing
1. Clone the repo down
2. `npm install`
3. `denali server`
4. Hit [localhost:3000](http://localhost:3000)## Tests
```sh
$ denali test
```