/level-http2

Access a leveldb instance via HTTP2

Primary LanguageJavaScriptApache License 2.0Apache-2.0

level-http2

Access a leveldb instance via HTTP2

Client

var levelHTTP2= require('level-http2');

var db= levelHTTP2.client('http://127.0.0.1:8080/');

// db is a normal level-up api
db.put('mykey','myvalue',function (err,value)
{
    db.get('mykey',function (err,value)
    {
        console.log(err, value);
    });
});

Server (embedded)

var levelHTTP2= require('level-http2');

levelHTTP2.server({ path: './data' }).listen(8080);

Server (cli)

$ level-http2 --path ./data --port 8080