baseview is a minimalistic CouchBase client for node.js based on the minimalistic CouchDB driver nano.
CouchBase provides view data as JSON, which can be accessed and streamed with this client. To store and retrieve single documents/key-value pairs, the memcached-library is required.
baseview = ''orbaseview = url: '' bucket: 'my_bucket'...// retrieve data from a viewbaseview;// retrieve data from a spatial index with bounding box.// see 'sparta' for bbox calculationsbaseview;//adding a design documentbaseview;// retrieve a design documentbaseview;// delete a design documentbaseview;
To create a geographical bounding box (bbox), have a look at sparta, a small library for geo calculations.
example with socket.io
Tests are written in specify. To run the tests, execute: node tests/views.js node tests/spatial.js
everyone is welcome to contribute. patches, tests, bugfixes, new features
- create an issue on github so the community can comment on your idea
- create a new branch
git checkout -b my_branch
- create tests for the changes you made
- make sure you pass both existing and newly inserted tests
- commit your changes
- push to your branch
git push origin my_branch
- create an pull request
proudly presented by Patrick Heneise, Barcelona.