cti-couchbase-client
v3.0.0
Published
A wrapper of couchnode which provides a consistent way for connection and design doc setup.
Downloads
9
Maintainers
Readme
cti-couchbase-client
A wrapper of couchnode which provides a consistent way for connection and schema setup.
Usage
const bunyan = require( 'bunyan' );
const CouchbaseClient = require( 'cti-couchbase-client' );
const pathLib = require( 'path' );
const log = bunyan.createLogger( { name: 'example' } );
const client = new CouchbaseClient( {
cnstr: 'couchbase://localhost',
log: log
} );
const bucket = client.openBucket( {
name: 'default',
designDocsPath: pathLib.join( __dirname, 'designDocs' )
} );
return bucket
.initAsync
.then( function() {
...
} );