mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
minor fixes for nextjs
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user