chesterfield
v2.0.1
Published
Couchbase SDK Wrapper For Functional Javascript
Downloads
6
Readme
Chesterfield
Chesterfield is wrapper for the Node JS Couchbase SDK for writing Functional Javascript.
Installation
npm install chesterfield --save
Running Tests
git clone https://github.com/binaryalchemist/chesterfield.git
cd chesterfield
npm test
Example
var cb = require('chesterfield');
var cluster = cb.cluster('couchbase://address2couchbase');
var bucket = cb.open(cluster, 'bucket_name', 'password');
var popeMobile = {
id: 9000,
type: 'miracle whip'
};
var popeMobileKey = 'vehicle_' + popeMobile.id;
cb.upsert(bucket, popeMobileKey, popeMobile, function(error, result) {
cb.get(bucket, popeMobileKey, function(error, result) {
console.log(JSON.stringify(result.value));
});
});
Contributing
Please see CONTRIBUTING.md
for more details on contributing to the repository.