Unknown SDK

connect

Connects to Kuzzle using the host property provided in the constructor options. Subsequent call have no effect if the SDK is already connected.

Arguments

Copied to clipboard!
connect();

Resolves

Resolves if the connection is successful.

Usage

Copied to clipboard!
try {
  await kuzzle.connect();
  console.log('Successfully connected');
} catch (error) {
  console.error(error.message);
}