adding d1 for cloudflare environments

This commit is contained in:
dswbx
2025-02-10 17:46:22 +01:00
parent 1e5c0dbc22
commit be39d1c374
12 changed files with 264 additions and 151 deletions

View File

@@ -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();