mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
updated examples: astro, nextjs, remix, bun, node
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user