mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
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`.
bknd + SvelteKit Example
This example shows how to integrate bknd with SvelteKit.
Setup
bun install
bun run dev
How it works
bknd.config.ts- bknd configuration with database connection, schema, and seed datasrc/hooks.server.ts- Routes/api/*requests to bkndsrc/routes/+page.server.ts- UsesgetApp()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