rethink-config

0.4.0 • Public • Published

Coverage Status Build Status

NPM

rethink-config

Configure databases, tables and indexes with Rethink Config.

By Chris Cates ⭐️

Features

  • Instant setup of your RethinkDB databases
  • Able to build databases, tables and indexes.

Installation

npm install rethink-config --save

Configuration

In order to configure your database look at the following example. This example is also in test.js in the root directory of this Git repo.

//In the real world you would use var rethinkConfig = require ('rethink-config');
var r = require("rethinkdbdash")();
var rethinkConfig = require ('./index');
 
rethinkConfig({
  //Specify the rethinkdbdash object.
  "r": r,
  //Specify the database
  "database": "Hello",
  //Specify your tables in an array.
  "tables": ["One", "Two", "Three"],
  //Specify your indexes in an array
  "indexes": [
    //Each index needs to be specified a table and an index.
    {
      "table": "One",
      "index": "IndexOne"
    },
    {
      "table": "One",
      "index": "IndexTwo"
    },
    {
      "table": "Two",
      "index": "IndexOne"
    }
  ]
}, function(err) {
  if (err) throw err
})

By Chris Cates

-- Thanks for checking out this npm module. Any questions, email me at hello@chriscates.ca.

Package Sidebar

Install

npm i rethink-config

Weekly Downloads

2

Version

0.4.0

License

MIT

Last publish

Collaborators

  • itschriscates