parse-rethinkdb-url

0.0.1 • Public • Published

parse-rethinkdb-url

Parse RethinkDB URL string into an object ready for consumption by RethinkDB JavaScript API.

Build Status

Installation

npm install --save parse-rethinkdb-url

Usage

var r = require('rethinkdb');
var parseRethinkdbUrl = require('parse-rethinkdb-url');
 
var options = parseRethinkdbUrl('rethinkdb://AzureDiamond:hunter2@localhost:28015/marvel');
// { host: 'localhost',
//   port: 28015,
//   db: 'marvel',
//   authKey: 'hunter2' }
 
r.connect(options, function(err, conn) { ... });

Please note that when using authentication both username and password must be provided. Username is ignored while password is used as authKey.

Readme

Keywords

none

Package Sidebar

Install

npm i parse-rethinkdb-url

Weekly Downloads

386

Version

0.0.1

License

MIT

Last publish

Collaborators

  • laggyluke