minor fixes for nextjs

This commit is contained in:
dswbx
2025-03-03 07:10:32 +01:00
parent 09074f6591
commit 00f52eb096
6 changed files with 19 additions and 5 deletions

View File

@@ -2,12 +2,20 @@ import { type NextjsBkndConfig, getApp as getBkndApp } from "bknd/adapter/nextjs
import { registerLocalMediaAdapter } from "bknd/adapter/node";
import { headers } from "next/headers";
// The local media adapter works well in development, and server based
// deployments. However, on vercel or any other serverless deployments,
// you shouldn't use a filesystem based media adapter.
//
// Additionally, if you run the bknd api on the "edge" runtime,
// this would not work as well.
//
// For production, it is recommended to uncomment the line below.
registerLocalMediaAdapter();
export const config = {
connection: {
// make sure to use a remote URL for production!
url: "file:data.db",
url: process.env.DB_URL as string,
authToken: process.env.DB_TOKEN as string,
},
} as const satisfies NextjsBkndConfig;