TypeScript / JS SDK
Install the official TypeScript SDK from GitHub Packages:
npm install @techasit5415/microbase-sdkQuick Usage
Section titled “Quick Usage”import Microbase from '@techasit5415/microbase-sdk';
const mb = new Microbase('http://localhost:3000');
// Authenticate a userawait mb.collection('users').authWithPassword('user@example.com', 'password123');
// Query recordsconst posts = await mb.collection('posts').getList(1, 20, { filter: 'published = true', sort: '-created_at', expand: 'author',});
// Subscribe to realtime updatesawait mb.collection('posts').subscribe('*', (e) => { console.log(e.action, e.record);});