mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-04 00:56:01 +00:00
Refactor: Rename api mode to headless
The 'api' mode is being renamed to 'headless' to better reflect its purpose: serving the API without the admin UI. This change aligns with the existing framework concept of a headless backend. The 'standalone' mode is renamed to 'admin' to indicate that it serves both the API and the admin UI.
This commit is contained in:
@@ -57,4 +57,4 @@ export default {
|
||||
assetsPath: "/admin/",
|
||||
logoReturnPath: "../..",
|
||||
},
|
||||
} satisfies Config<"standalone">;
|
||||
} satisfies Config<"admin">;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createBknd } from "bknd/adapter/universal";
|
||||
import bkndConfig from "../../bknd.config";
|
||||
import type { EnvGetter } from "@builder.io/qwik-city/middleware/request-handler";
|
||||
|
||||
export const getApp = async (env?: EnvGetter) => createBknd({ mode: "standalone", options: bkndConfig }, env);
|
||||
export const getApp = async (env?: EnvGetter) => createBknd({ mode: "admin", options: bkndConfig }, env);
|
||||
|
||||
export const handler = async (req: Request, env?: EnvGetter) => {
|
||||
return (await getApp(env)).serve()(req);
|
||||
|
||||
Reference in New Issue
Block a user