leveldb-mount
leveldb with backend + optional repl built with subleveldown and multileveldown.
server
server.js
var leveldb = leveldb // see options
server+repl
var leveldb = leveldb // see options
Note if no credentials are given the repl is not available.
client
browserifying this module gives you a client
see examples
routes
routes.js using http-hash
var leveldb = var routes = leveldb // see optionsrouterrouter
db
var db = leveldb // see optionsvar inbox = dbinboxset...dbset...
optional repl
navigation to /repl.html and window.db
and window.sublevel
will now be set.
options
var opt = dbPath: 'path' replCredentials: 'user:pass' encoding: keyEncoding: 'utf8' valueEncoding: 'json'
opt.replCredentials
is only needed if you want the repl.opt.encoding
defaults toutf8
for keys andjson
for values.opt.dbPath
has to contain a value.opt.auth
optional auth function (request, cb).
encoding
is passed to the repl!
example
npm install concat-stream
node example/index.js