mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
public commit
This commit is contained in:
23
examples/bun/index.ts
Normal file
23
examples/bun/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
// somehow causes types:build issues on app
|
||||
|
||||
import type { CreateAppConfig } from "bknd";
|
||||
import { serve } from "bknd/adapter/bun";
|
||||
|
||||
const root = "../../node_modules/bknd/dist";
|
||||
const config = {
|
||||
connection: {
|
||||
type: "libsql",
|
||||
config: {
|
||||
url: "http://localhost:8080"
|
||||
}
|
||||
}
|
||||
} satisfies CreateAppConfig;
|
||||
|
||||
Bun.serve({
|
||||
port: 1337,
|
||||
fetch: serve(config, root)
|
||||
});
|
||||
|
||||
console.log("Server running at http://localhost:1337");
|
||||
s*/
|
||||
Reference in New Issue
Block a user