mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
updated examples
This commit is contained in:
@@ -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*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["ESNext", "DOM"],
|
||||
"target": "ESNext",
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"jsx": "react-jsx",
|
||||
"allowJs": true,
|
||||
|
||||
Reference in New Issue
Block a user