Files
bknd/examples/sveltekit
Szymon Rączka a97a79f11e fix(sveltekit): make adapter runtime-agnostic
Remove process.env default to support all SvelteKit runtimes
(Node, Cloudflare Workers, Vercel Edge, Deno). Users now pass
env explicitly via $env/dynamic/private.
2025-12-28 12:47:09 +01:00
..
2025-12-26 17:30:03 +01:00
2025-12-26 17:30:03 +01:00
2025-12-26 17:30:03 +01:00
2025-12-26 17:30:03 +01:00
2025-12-26 17:30:03 +01:00
2025-12-26 17:30:03 +01:00
2025-12-26 17:30:03 +01:00

bknd + SvelteKit Example

This example shows how to integrate bknd with SvelteKit.

Setup

bun install
bun run dev

How it works

  1. bknd.config.ts - bknd configuration with database connection, schema, and seed data
  2. src/hooks.server.ts - Routes /api/* requests to bknd
  3. src/routes/+page.server.ts - Uses getApp() to fetch data server-side

API Endpoints

  • GET /api/data/entity/todos - List todos (requires auth)
  • POST /api/auth/password/login - Login

Test Credentials

  • Email: admin@example.com
  • Password: password