TypeScript SDK 0.4.2-rc.1 Setup
Use this setup guide for apps pinned to the 0.4.2-rc.1 TypeScript SDK package line.
Install
npm install @kalamdb/client@0.4.2-rc.1Connect
import { Auth, createClient } from '@kalamdb/client';
const client = createClient({
url: 'http://127.0.0.1:8080',
authProvider: async () => Auth.jwt('<ACCESS_TOKEN>'),
});Query
const response = await client.query('SELECT CURRENT_USER();');
console.log(response.status, response.results?.[0]);Realtime
const unsubscribe = await client.subscribeWithSql(
'SELECT * FROM app.messages',
(event) => console.log(event),
);
await unsubscribe();For active development, compare this archive with latest TypeScript SDK docs.
Last updated on