Security News
NVD Backlog Tops 20,000 CVEs Awaiting Analysis as NIST Prepares System Updates
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
kuzzle-sdk
Advanced tools
This is the official Javascript SDK for the free and open-source backend Kuzzle. It provides a way to dial with a Kuzzle server from Javascript applications using protocols.
Currently, the SDK provides 2 protocols: Http and WebSocket. WebSocket protocol implement the whole Kuzzle API, while the HTTP protocol does not implement realtime features (rooms and subscriptions).
All SDK methods return a promise resolving the result part of Kuzzle API responses. If an error occurs, the promise is rejected with an Error object embedding the error part of the API response.
For example, for the action create of the controller collection (collection:create), the property result contains { "acknowledged": true }
. This is therefore what will be returned by the SDK method if successful.
Any error must be caught either at the end of the Promise
chain, or by using async/await
and a try...catch
.
:books: Documentation
Kuzzle is an open-source backend that includes a scalable server, a multiprotocol API, an administration console and a set of plugins that provide advanced functionalities like real-time pub/sub, blazing fast search and geofencing.
Train yourself and your teams to use Kuzzle to maximize its potential and accelerate the development of your projects.
Our teams will be able to meet your needs in terms of expertise and multi-technology support for IoT, mobile/web, backend/frontend, devops.
:point_right: Get a quote
Kuzzle Version | SDK Version |
---|---|
1.x.x | 5.x.x |
1.x.x | 6.x.x |
2.x.x | 7.x.x |
This SDK can be used either in NodeJS or in a browser.
npm install kuzzle-sdk
To run the SDK in the browser, you have to build it yourself by cloning this repository and running
$ npm install
$ npm run build
A dist
directory will be created, containing a browser version of this SDK.
<script type="text/javascript" src="dist/kuzzle.min.js"></script>
or use the CDN:
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/kuzzle-sdk@latest/dist/kuzzle.min.js"></script>
Then the Kuzzle SDK will be available under the KuzzleSDK
variable:
<script>
const kuzzle = new KuzzleSDK.Kuzzle(
new KuzzleSDK.WebSocket('localhost')
);
// ...
</script>
If you use Webpack, you'll likely use the NPM-packaged version of the SDK (like in Node)
npm install kuzzle-sdk
But you'll still need to pick the built version (which ships with the package).
// with the classic require...
const { Kuzzle } = require('kuzzle-sdk')
// ... or with the new import directive.
import { Kuzzle } from 'kuzzle-sdk'
The SDK supports different protocols. When instantiating, you must choose the protocol to use and fill in the different options needed to connect to Kuzzle.
const { Kuzzle, WebSocket } = require('kuzzle-sdk');
const kuzzle = new Kuzzle(
new WebSocket('localhost', { port: 7512 })
);
try {
await kuzzle.connect();
const serverTime = await kuzzle.server.now();
console.log(serverTime);
} catch (error) {
console.error(error);
}
FAQs
Official Javascript SDK for Kuzzle
The npm package kuzzle-sdk receives a total of 1,287 weekly downloads. As such, kuzzle-sdk popularity was classified as popular.
We found that kuzzle-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.