add deno to the cli starters

This commit is contained in:
dswbx
2025-10-25 10:18:43 +02:00
parent 1fc6e810ae
commit b787837dd2
7 changed files with 48 additions and 16 deletions

5
examples/.gitignore vendored
View File

@@ -1,2 +1,5 @@
*/package-lock.json
*/bun.lock
*/bun.lock
*/deno.lock
*/node_modules
*/*.db

8
examples/deno/deno.json Normal file
View File

@@ -0,0 +1,8 @@
{
"nodeModulesDir": "auto",
"imports": {
"bknd": "npm:bknd@0.19.0-rc.1"
},
"links": ["../../app/"],
"unstable": ["raw-imports"]
}

View File

@@ -1,14 +1,12 @@
import { createRuntimeApp } from "bknd/adapter";
import { createRuntimeApp, serveStaticViaImport } from "bknd/adapter";
const app = await createRuntimeApp({
connection: {
url: "file:./data.db",
},
adminOptions: {
// currently needs a hosted version of the static assets
assetsPath: "https://cdn.bknd.io/bknd/static/0.15.0-rc.9/",
},
serveStatic: serveStaticViaImport(),
});
// @ts-ignore
Deno.serve(app.fetch);
export default {
fetch: app.fetch,
};

View File

@@ -1,7 +0,0 @@
{
"name": "bknd-deno-example",
"private": true,
"dependencies": {
"bknd": "file:../../app"
}
}