freeforall

0.0.0 • Public • Published

FREE FOR ALL

what it is?

This is the simplest key-value store I could make up.

No auth, usable from any domain.

Use it for your prototypes only, please.

Uses leveldb and segments dbs with the level-sublevel nodejs module.

install

> npm install -g freeforall

serve

> freeforall <dbPath:multi.db> <port:5566>

direct HTTP usage

GET /<dbname> returns pipe separated array of existing keys

GET /<dbname>/clear

GET /<dbname>/get/<key>

GET /<dbname>/del/<key>

GET /<dbname>/set/<key>/<value>

browser usage

async

<script type="text/javascript" src="http://<FFA_SERVER>:<FFA_PORT|5566>"></script> 
<!-- you can optionally suffix the URL with /cliBrowserAsync.js for consistency -->
var f = freeforall(dbName)
 
f.allKeys(cb) // cb(err, arrOfKeys)
 
f.clear(cb)
 
f.get(key, cb) // cb(err, val)
 
f.del(key, cb)
 
f.set(key, val, cb)

jsbin sample

sync

<script type="text/javascript" src="http://<FFA_SERVER>:<FFA_PORT|5566>/cliBrowserSync.js"></script> 
var f = freeforall(dbName)
 
f.allKeys() // array of keys
 
f.clear()
 
f.get(key) // returns val
 
f.del(key)
 
f.set(key, val)

jsbin sample

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i freeforall

    Weekly Downloads

    0

    Version

    0.0.0

    License

    ISC

    Last publish

    Collaborators

    • josepedrodias