From ddfc3e599feb8d8c0b4dae94a47e34a6ae99f723 Mon Sep 17 00:00:00 2001 From: dswbx Date: Mon, 15 Sep 2025 14:36:00 +0200 Subject: [PATCH] docs: corrected `app` function parameter signature --- .../integration/(runtimes)/cloudflare.mdx | 10 +++++----- docs/content/docs/(documentation)/usage/cli.mdx | 2 +- docs/content/docs/(documentation)/usage/database.mdx | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/content/docs/(documentation)/integration/(runtimes)/cloudflare.mdx b/docs/content/docs/(documentation)/integration/(runtimes)/cloudflare.mdx index fc227a7..1157e06 100644 --- a/docs/content/docs/(documentation)/integration/(runtimes)/cloudflare.mdx +++ b/docs/content/docs/(documentation)/integration/(runtimes)/cloudflare.mdx @@ -52,17 +52,17 @@ export default serve(); // manually specifying a D1 binding: export default serve({ - app: ({ env }) => d1({ binding: env.D1_BINDING }), + app: (env) => d1({ binding: env.D1_BINDING }), }); // or specify binding using `bindings` export default serve({ - bindings: ({ env }) => ({ db: env.D1_BINDING }), + bindings: (env) => ({ db: env.D1_BINDING }), }); // or use LibSQL export default serve({ - app: ({ env }) => ({ url: env.DB_URL }), + app: (env) => ({ url: env.DB_URL }), }); ``` @@ -199,7 +199,7 @@ import { d1 } from "bknd/adapter/cloudflare"; import { withPlatformProxy } from "bknd/adapter/cloudflare/proxy"; export default withPlatformProxy({ - app: ({ env }) => ({ + app: (env) => ({ connection: d1({ binding: env.DB }), }), }); @@ -217,7 +217,7 @@ Instead, it's recommended to split this configuration into separate files, e.g. import type { CloudflareBkndConfig } from "bknd/adapter/cloudflare"; export default { - app: ({ env }) => ({ + app: (env) => ({ connection: d1({ binding: env.DB }), }), } satisfies CloudflareBkndConfig; diff --git a/docs/content/docs/(documentation)/usage/cli.mdx b/docs/content/docs/(documentation)/usage/cli.mdx index 2ccd875..ea81bee 100644 --- a/docs/content/docs/(documentation)/usage/cli.mdx +++ b/docs/content/docs/(documentation)/usage/cli.mdx @@ -86,7 +86,7 @@ export default { url: "file:data.db", }, // or use the `app` function which passes the environment variables - app: ({ env }) => ({ + app: (env) => ({ connection: { url: env.DB_URL, }, diff --git a/docs/content/docs/(documentation)/usage/database.mdx b/docs/content/docs/(documentation)/usage/database.mdx index b09587f..4608d62 100644 --- a/docs/content/docs/(documentation)/usage/database.mdx +++ b/docs/content/docs/(documentation)/usage/database.mdx @@ -147,7 +147,7 @@ To manually specify which D1 database to take, you can specify it explicitly: import { serve, d1 } from "bknd/adapter/cloudflare"; export default serve({ - app: ({ env }) => d1({ binding: env.D1_BINDING }), + app: (env) => d1({ binding: env.D1_BINDING }), }); ```