mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
add deno to the cli starters
This commit is contained in:
8
examples/deno/deno.json
Normal file
8
examples/deno/deno.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"nodeModulesDir": "auto",
|
||||
"imports": {
|
||||
"bknd": "npm:bknd@0.19.0-rc.1"
|
||||
},
|
||||
"links": ["../../app/"],
|
||||
"unstable": ["raw-imports"]
|
||||
}
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "bknd-deno-example",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"bknd": "file:../../app"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user