Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-11130

Feedback on Health Check | Couchbase Docs - nodejs sample is from 2.x instead of 3.x

    XMLWordPrintable

Details

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

      Attachments

        Activity

          People

            richard.smedley Richard Smedley
            michael.reiche Michael Reiche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              PagerDuty