updated examples

This commit is contained in:
dswbx
2024-11-23 11:21:25 +01:00
parent 2433833ad0
commit f70e2b2e10
13 changed files with 74 additions and 64 deletions

View File

@@ -1,10 +1,9 @@
/*
// somehow causes types:build issues on app
// @ts-ignore somehow causes types:build issues on app
import type { CreateAppConfig } from "bknd";
// @ts-ignore somehow causes types:build issues on app
import { serve } from "bknd/adapter/bun";
const root = "../../node_modules/bknd/dist";
// this is optional, if omitted, it uses an in-memory database
const config = {
connection: {
type: "libsql",
@@ -16,8 +15,12 @@ const config = {
Bun.serve({
port: 1337,
fetch: serve(config, root)
fetch: serve(
config,
// this is only required to run inside the same workspace
// leave blank if you're running this from a different project
"../../node_modules/bknd/dist"
)
});
console.log("Server running at http://localhost:1337");
s*/