freeforall
v0.0.0
Published
remote key value store without auth
Downloads
1
Readme
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)
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)