The Node.js SDK allows you to connect to a Couchbase Server cluster from Node.js. The Node.js SDK is a native Node.js module that uses the very fast libcouchbase library to handle communicating with the cluster over the Couchbase binary protocol.
const queryResult = await cluster.query("SELECT * FROM `travel-sample`.inventory.hotel WHERE city=$1 LIMIT 10", { parameters: ['Paris']});
queryResult.rows.forEach((row)=>{
console.log(row);
});
Couchbase Node.js SDK 3.2
Dive right in with a quick install and Hello World guide for Node.js SDK or Ottoman ODM. Try out our Travel Sample Application. And take a look at the Scopes and Collections.
The documentation supplements the practical Howto docs with references and concept guides, for those who prefer a broader understanding before diving in and coding.
Check out Ottoman ODM, an Object Document Mapper library built for Node.js and Couchbase, for speedier, scalable development.
Leverage the new Couchbase Server Scopes and Collection features to build multi-tenant micro-service application.
Those useful nuts-and-bolts guides to compatibility tables; release notes; contribution guide; and the migration guide for moving to the 3.0 API.
For community help, visit the Couchbase forums. The Node.js SDK can be combined with many other projects in the broader JavaScript ecosystem and beyond — in the Couchbase Blog there are examples covering everything from Apache OpenWhisk to Vue.js.