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,5 +1,6 @@
import type { IncomingMessage } from "node:http";
import type { App, CreateAppConfig } from "bknd";
import { type App, type CreateAppConfig, registries } from "bknd";
import { StorageLocalAdapter } from "media/storage/adapters/StorageLocalAdapter";
export type CloudflareBkndConfig<Env = any> = {
mode?: "warm" | "fresh" | "cache" | "durable";
@@ -47,3 +48,7 @@ export function nodeRequestToRequest(req: IncomingMessage): Request {
headers
});
}
export function registerLocalMediaAdapter() {
registries.media.register("local", StorageLocalAdapter);
}