Skip to content
This repository has been archived by the owner on Mar 24, 2020. It is now read-only.
/ rieluz-dsn Public archive

DSN Parser to build config connection for rieluz lib.

Notifications You must be signed in to change notification settings

albertomr86/rieluz-dsn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSN Parser for rieluz

DSN Parser to build config connection for rieluz lib. see: https://github.com/joelmcs6/rieluz

Build Status

Installation

npm install rieluz-dsn

Usage

var parse = require('rieluz-dsn');

// ES6
// import parse from 'rieluz-dsn';

var dsn = "orientdb:https://admin:admin123@localhost:2424/mydb?conn=default"
var rieluzConfig = parse(dsn);

// Use rieluzConfig when call .connect method

DSN string format

[orientdb:]//[<user>:<pass>@]localhost[:<port>]/<database>[?conn=<default>&servers=<host>[:<port>],<host>[:<port>],...]

DSN parts

Component Description
driver mongo:https:// or //
auth user:pass@
host 127.0.0.1:2424
database /test
connection /?conn=default
dedicated servers &servers=192.168.1.1:2425,192.168.1.2:2425

Examples

orientdb:https://localhost:2424/mydb orientdb:https://localhost:2424/mydb?conn=default orientdb:https://admin:[email protected]:2424/mydb?conn=default orientdb:https://admin:[email protected]:2424/mydb?conn=default&servers=127.0.0.1:2425 orientdb:https://admin:[email protected]:2424/mydb?conn=default&servers=192.168.1.1:2425,192.168.1.2:2425

About

DSN Parser to build config connection for rieluz lib.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published