npm.io
3.0.0 • Published 10 years ago

cti-couchbase-client

Licence
MIT
Version
3.0.0
Deps
3
Vulns
5
Weekly
0

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() {
      ...
    } );

Keywords