Book Image

Couchbase Essentials

Book Image

Couchbase Essentials

Overview of this book

Table of Contents (15 chapters)
Couchbase Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The Couchbase Node.js SDK


The Couchbase Node.js SDK is a Node.js library that wraps the Couchbase C SDK. Before installing this library, the C library must be installed.

Current version

Currently, the latest version is 2.0.2. This SDK should be used for all development against Couchbase Server versions from 2.5 to 3.x.

How to obtain it

The Node.js users will likely wish to use the npm package manager to install the Couchbase Node.js SDK. Windows users must also have node-gyp along with Visual C++ 10. Information on installing node-gyp is available at https://github.com/TooTallNate/node-gyp.

$ npm install couchbase

Additionally, the SDK team publishes binaries, which may be found at http://docs.couchbase.com/developer/node-2.0/download-links.html. The source code for the library is available on GitHub at https://github.com/couchbase/couchnode.

The basics

The following snippet demonstrates the basics of using the Couchbase PHP SDK:

var couchbase = require('couchbase');
var cluster = new couchbase.Cluster();
var bucket = cluster.openBucket('default');