updated examples: astro, nextjs, remix, bun, node

This commit is contained in:
dswbx
2024-12-23 16:50:26 +01:00
parent a17fd2df67
commit 70e42a02d7
31 changed files with 319 additions and 35 deletions

View File

@@ -1,7 +1,8 @@
import path from "node:path";
import { serve as honoServe } from "@hono/node-server";
import { serveStatic } from "@hono/node-server/serve-static";
import { App, type CreateAppConfig } from "bknd";
import { App, type CreateAppConfig, registries } from "bknd";
import { registerLocalMediaAdapter } from "../index";
export type NodeAdapterOptions = CreateAppConfig & {
relativeDistPath?: string;
@@ -21,6 +22,8 @@ export function serve({
buildOptions = {},
...config
}: NodeAdapterOptions = {}) {
registerLocalMediaAdapter();
const root = path.relative(
process.cwd(),
path.resolve(relativeDistPath ?? "./node_modules/bknd/dist", "static")