adonis-rethinkdb
v1.0.1
Published
AdonisJS RethinkDB provider
Downloads
3
Readme
RethinkDB provider for AdonisJS v5
This is just RethinkDB provider.
Lucid-RethinkDb will follow after I get some more time
Installation
Install package with
npm i adonis-rethinkdb
oryarn add adonis-rethinkdb
Add
"adonis-rethinkdb"
to yourproviders
array in.adonisrc.json
Add
adonis-rethinkdb
totsconfig.json
types arrayCreate
config/rethinkdb.ts
config file and insert following configconst rethinkDb = { db: 'test', host: 'localhost', port: 28015, // tls: true, // ca: caCert, // rejectUnauthorized: false, } export default rethinkDb
Import
import { r } from '@ioc:RethinkDb'
Run queries in default DB:
let players = await r.table('players').run()
Run queries in specified DB:
let players = await r.db('main').table('players').run()