mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
adding d1 for cloudflare environments
This commit is contained in:
@@ -1,15 +1,5 @@
|
||||
/// <reference types="@cloudflare/workers-types" />
|
||||
|
||||
import { serve } from "bknd/adapter/cloudflare";
|
||||
|
||||
export default serve({
|
||||
app: (args) => ({
|
||||
connection: {
|
||||
type: "libsql",
|
||||
config: {
|
||||
url: "http://localhost:8080"
|
||||
}
|
||||
}
|
||||
}),
|
||||
onBuilt: async (app) => {
|
||||
app.modules.server.get("/custom", (c) => c.json({ hello: "world" }));
|
||||
}
|
||||
});
|
||||
export default serve();
|
||||
|
||||
Reference in New Issue
Block a user