Files
dswbx 7e8b357bbb add support for /admin route in backend handler and enable asset copying
updated `hooks.server.ts` to handle `/admin` routes and prevent fallback for 404 responses. added `adminBasepath` config to match backend paths. introduced assets copying step via `postinstall` script and included `robots.txt` and `favicon.ico` under `static`.
2026-01-09 13:11:01 +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