JSPM

level-fancy-server

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q29906F
  • License MIT

LevelUP with some useful plugins and wrapped to get a leveldb database up and started quickly.

Package Exports

  • level-fancy-server

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (level-fancy-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

level-fancy-server

Custom leveldb database server meant to be used with one or more level-fancy clients. Uses multi-level for multiple tcp client connections, sublevel for key organization, level-live-stream for pub/sub functionality, level-sec for secondary indexes, and memdown for optional in memory data storage.

Can run as a standalone server or run within a node application.

##Status Work in progress.

Usage

cd level-fancy-server
npm install

Start a standalone server with default settings

node server --start

Start with custom settings. Pass in path to configuration file

node server --start ./path/to/customConfig.js

Can also be started and stopped programatically

var Server = require('level-fancy-server').Server
var client = require('multilevel').client(manifest)

//returns the multilevel server which multi level clients can connect to
var server = new Server().start()

server.pipe(client.createRpcStream()).pipe(server)

client.sublevel.put ...
...
//shut down server
server.stop()

If you want direct access to the leveldb database not the multi level wrapper, then do this

var server = new Server()
var multilevel = server.start()
//access the db object on server
server.db.sublevel.put ...

Configuration

View default configuration file: config.js

By default the database uses in memory storage with memdown. Comment out db:require('memdown') to enable storage to disk.

See level-fancy for connecting with clients.