unified runtime and framework adapters

This commit is contained in:
dswbx
2024-12-24 09:43:16 +01:00
parent c1e92e503b
commit 76da14294c
20 changed files with 276 additions and 253 deletions

View File

@@ -2,19 +2,17 @@ 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"
}
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" }));
}
}),
onBuilt: async (app) => {
app.modules.server.get("/custom", (c) => c.json({ hello: "world" }));
},
manifest
);
});