Skip to content

Covertness/node-dht-store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-dht-store

Build Status Coverage Status npm version Downloads

A key/value store based on DHT.

Features

  • use custom keys differ from BEP 44
  • support ttl

Install

$ npm install dht-store

Example

var Store = require('dht-store');

var store = new Store();
store.on('ready', function() {
    store.kvPut('key', 'test', function(err, key, n) {
        if (err) {
            console.log('err:', err);
            store.destroy();
            return;
        }

        store.kvGet('key', function(err, n, v) {
            console.log('value:', v);
            store.destroy();
        });
    });
});

More examples can be found in the folder examples.

Build from source

$ make init
$ make build

Test

$ make test

About

A key/value store based on DHT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published