@altertable/data-app-bun
v0.77.0
Published
Local Bun servers, lakehouse access, and development previews for Altertable data apps.
Readme
@altertable/data-app-bun
Local Bun servers, lakehouse access, and development previews for Altertable data apps.
Installation
bun add @altertable/data-app-bun
bun add --dev @types/bunRequires Bun.
Usage
Serve a local app's HTML entry and operation registry:
import { serveLocalApp } from '@altertable/data-app-bun';
import page from './index.html';
import { operations } from './operations.ts';
serveLocalApp({ page, operations, title: 'Activity' });The app supplies index.html and operations.ts. serveLocalApp() configures
lakehouse access from server-only credentials; operations use their query()
helper.
Local serving does not authenticate hosted viewers; use
@altertable/data-app/server with per-request authorization for hosted apps.
Preview a single-file app
data-app-preview launches a preview from the CLI environment. Run it from the
project containing the installed, version-matched data-app and React dependencies:
cd /absolute/path/to/installed-preview-project
set -lx ALTERTABLE_APP_FILE /absolute/path/to/app.tsx
set -lx PORT 25837
set -lx ALTERTABLE_DATA_PROXY_URL http://127.0.0.1:12345
set -lx ALTERTABLE_DATA_PROXY_TOKEN your-loopback-proxy-token
bun run data-app-previewUse an absolute source path. PORT defaults to 25837; use 0 for an available
port. The runner prints the URL and stops on SIGINT or SIGTERM.
Documentation
See the Bun guide for operations and credentials.
