Files
bknd/examples/cloudflare-worker/src/index.ts
2024-11-23 11:21:25 +01:00

21 lines
447 B
TypeScript

import { serve } from "bknd/adapter/cloudflare";
import manifest from "__STATIC_CONTENT_MANIFEST";
export default serve(
{
app: (env: Env) => ({
connection: {
type: "libsql",
config: {
url: "http://localhost:8080"
}
}
}),
onBuilt: async (app) => {
app.modules.server.get("/hello", (c) => c.json({ hello: "world" }));
}
},
manifest
);