Details
-
Bug
-
Resolution: Unresolved
-
Test Blocker
-
tech-debt
-
DOC-2023-S17, DOC-2023-S18, DOC-2023-S19, DOC-2023-S20, DOC-2023-S21, DOC-2023-S22, DOC-2023-S23, DOC-2023-S24, DOC-2023-S25, DOC-2023-S26
Description
Browser environment: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
Sample is out of date. It is for SDK 2.x.
See the java sample for how it is in 3.x (nodejs is similar)
https://docs.couchbase.com/java-sdk/current/howtos/health-check.html
Reporter: Michael Reiche
E-mail: michael.reiche@couchbase.com
in 3.x it looks like this :
'use strict';
|
const couchbase = require('couchbase');
|
(async () => {
|
const cluster = await couchbase.connect("couchbase://localhost", {
|
username: 'Administrator',
|
password: 'password'
|
});
|
console.log("cluster : "+cluster);
|
const bucket = cluster.bucket("travel-sample");
|
const result = await cluster.diagnostics();
|
console.log(result)
|
console.log(result.services)
|
cluster.close();
|
})()
|