dh

0.2.0 • Public • Published

Node.js - dh

dh is a distributed hash. Simply a wrapper around the Redis hash.

Install

npm install [-g] dh

Programatically

var dh = require('dh')
 
dh.create({name: 'myhash'}, function(err, h) {
  h.set('key1', 'data1')
})

dh-import

Imports a CSV (two-field) file into the hash.

  Usage: dh-import [options]

  Options:

    -h, --help              output usage information
    -V, --version           output the version number
    -f, --file [inputFile]  input file otherwise the default is STDIN
    -h, --host [host]       host of redis server, the default is localhost
    -a, --auth [password]   password of redis server
    -p, --port [number]     port of redis server, the default is 6379
    -n, --name [hashName]   name of the hash

dh-export

Exports to a CSV (two-field).

  Usage: dh-export [options]

  Options:

    -h, --help               output usage information
    -V, --version            output the version number
    -f, --file [outputFile]  output file otherwise the default is STDOUT
    -h, --host [host]        host of redis server, the default is localhost
    -a, --auth [password]    password of redis server
    -p, --port [number]      port of redis server, the default is 6379
    -n, --name [hashName]    name of the hash

note: calling the -f flag is insanely slow. Just pipe stdout to a file. I'll probably remove this flag.

License

Licensed under MIT. See LICENSE for more details.

Copyright (c) 2012-2013 JP Richardson

Dependencies (4)

Dev Dependencies (2)

Package Sidebar

Install

npm i dh

Weekly Downloads

1

Version

0.2.0

License

none

Last publish

Collaborators

  • jprichardson