Socket
Book a DemoInstallSign in
Socket

co-couchbase

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co-couchbase

A couchbase wrapper to be used with visionmedia's co library.

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

co-couchbase is a couchbase wrapper to be used with visionmedia's co library.

In order to use co and co-couchbase, you need to have node version 0.11.x and you must use --harmony-generators flag when running node.

Installation

NOTE: co-couchbase doesn't work with node 0.11.11 and 0.11.12 (maybe there's a problem with node-gyp?). It's only tested with node 0.11.10.

$ node --version
v0.11.10
$ npm install co
$ npm install co-couchbase

Usage

test.js:

var co        = require('co');
var couchbase = require('co-couchbase');

var db = new couchbase.Connection({ bucket: "default" }, co(function *(err) {
  yield db.set('test_doc', 'co-couchdb');
  var result = yield db.get('test_doc');
  console.log(result.value);  // logs 'co-couchdb'
  process.exit(0);
}));

Then, run it:

$ node --harmony test.js

Examples

See examples/ directory.

Keywords

co

FAQs

Package last updated on 29 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts