mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
Add framework adapter for SvelteKit with:
- `getApp()` - get bknd app instance
- `serve()` - request handler for hooks.server.ts
Usage in hooks.server.ts:
```typescript
import { serve } from "bknd/adapter/sveltekit";
import config from "../bknd.config";
const bkndHandler = serve(config);
export const handle = async ({ event, resolve }) => {
if (event.url.pathname.startsWith("/api/")) {
return bkndHandler(event);
}
return resolve(event);
};
```
Includes:
- Adapter implementation (app/src/adapter/sveltekit/)
- Test suite
- Working example (examples/sveltekit/)
- Package exports and types
15 lines
326 B
JSON
15 lines
326 B
JSON
{
|
|
"extends": "./.svelte-kit/tsconfig.json",
|
|
"compilerOptions": {
|
|
"allowJs": true,
|
|
"checkJs": true,
|
|
"esModuleInterop": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"resolveJsonModule": true,
|
|
"skipLibCheck": true,
|
|
"sourceMap": true,
|
|
"strict": true,
|
|
"moduleResolution": "bundler"
|
|
}
|
|
}
|