Node.js
Add SDK Dependency
npm install --save @hackler/javascript-sdkyarn add @hackler/javascript-sdkSDK Initialization
hackleClient is the class that provides methods for using SDK features.
To use the SDK, you need to initialize hackleClient.
Instantiation
Instantiate hackleClient by passing the SDK Key.
hackleClient periodically synchronizes with the Hackle server as a background task to obtain the necessary information.
You can find the SDK Key in SDK Integration Info located inside the Hackle Service Dashboard.
const Hackle = require("@hackler/javascript-sdk");
// YOUR_SERVER_SDK_KEY 자리에 SDK 키를 넣습니다.
const hackleClient = Hackle.createInstance("YOUR_SERVER_SDK_KEY");Initialization Complete
When the SDK is initialized, it fetches the necessary information from the Hackle server.
Initialization is performed asynchronously and you can receive the initialization completion callback via onReady.
Shutdown
You must call the close() method when the application shuts down. This releases resources in use and sends any remaining events.
Last updated