Skip to Content
Setup & Quick Start

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

bash snippetBASH
npm install @kalamdb/client@0.4.2-rc.1

Connect

ts snippetTS
import { Auth, createClient } from '@kalamdb/client'; const client = createClient({  url: 'http://127.0.0.1:2900',  authProvider: async () => Auth.jwt('<ACCESS_TOKEN>'),});

Query

ts snippetTS
const response = await client.query('SELECT CURRENT_USER();');console.log(response.status, response.results?.[0]);

Realtime

ts snippetTS
const unsubscribe = await client.liveEvents(  'SELECT * FROM app.messages',  (event) => console.log(event),); await unsubscribe();

For active development, compare this archive with latest TypeScript SDK docs.

Last updated on