rochefort

2.0.1 • Public • Published

$ npm install rochefort

example:

var data = new Buffer('asdasljdasjhd') var r = new rochefort('http://localhost:8002') var stored_offset r.append({data: data}).then(offset => { // append example returns the stored offset // since the offset is 64 bit, rochefort also returns a string (offset_str) // and we use the string version stored_offset = offset return r.get({offset: offset}) }).then(value => { // get examplem returns the stored buffer console.log(value) }).then(() => { // again offsets is array of strings returned from append() return r.getMulti({offsets: [stored_offset,stored_offset,stored_offset,stored_offset]}) }).then(values => { // multi get example // returns array of Buffers console.log(values) })

Readme

Keywords

Package Sidebar

Install

npm i rochefort

Weekly Downloads

0

Version

2.0.1

License

MIT

Unpacked Size

5.02 kB

Total Files

4

Last publish

Collaborators

  • jackdoe