SDK
SDK Javascript v7.x
2

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 #

connect();

Resolves #

Resolves if the connection is successful.

Usage #

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