mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 08:06:00 +00:00
Fix typos in web integration docs
Correct a grammatical error and a minor typo in the web integration documentation to improve clarity.
This commit is contained in:
@@ -55,7 +55,7 @@ export default {
|
||||
<Callout type="info" title="The Config type helper">
|
||||
The `Config` type is a helper type which maps the correct config type based on mode.
|
||||
|
||||
Use `Config<"api">` when you are using React-based framework otherwise use `Config<"standalone">` to serve both the Admin UI and bknd api using the same handler
|
||||
Use `Config<"api">` when you are using a React-based framework otherwise use `Config<"standalone">` to serve both the Admin UI and bknd api using the same handler
|
||||
</Callout>
|
||||
|
||||
### Helper Singleton
|
||||
@@ -64,7 +64,7 @@ import { createBknd } from "bknd/adapter/web";
|
||||
import config from "../bknd.config";
|
||||
|
||||
export const bknd = createBknd({ mode: "standalone", options: config }, process.env);
|
||||
// ^ use "api" if not using React based framework
|
||||
// ^ use "api" if using a React-based framework
|
||||
```
|
||||
|
||||
`createBknd` returns three methods:
|
||||
@@ -82,7 +82,7 @@ The web adapter supports two approaches to serving the admin UI:
|
||||
| Path | Best For | How |
|
||||
|------|----------|-----|
|
||||
| **Client-side** (default) | React frameworks: Next.js, Astro, React Router, Tanstack Start, Waku | Import and render `<Admin />` in your own React route |
|
||||
| **Server-side** | Non-React frameworks: SvelteKit, Nuxt, , Bun, Node, Deno | The server serves the Admin UI assets and API |
|
||||
| **Server-side** | Non-React frameworks: SvelteKit, Nuxt, Bun, Node, Deno | The server serves the Admin UI assets and API |
|
||||
|
||||
## Path 1: Client-Side Admin (Default)
|
||||
|
||||
@@ -116,7 +116,7 @@ import { createBknd } from "bknd/adapter/web";
|
||||
import config from "../bknd.config";
|
||||
|
||||
export const bknd = createBknd({ mode: "standalone", options: config }, env);
|
||||
// ^ use "api" if not using React based framework
|
||||
// ^ use "api" if using a React-based framework
|
||||
```
|
||||
|
||||
You'll also need to serve the admin's static assets (JS, CSS). Choose one of three strategies:
|
||||
@@ -190,7 +190,7 @@ export default {
|
||||
|
||||
## Serving Requests
|
||||
|
||||
Exmaple use `bknd.serve()` as a fetch handler in your server:
|
||||
Example use `bknd.serve()` as a fetch handler in your server:
|
||||
|
||||
```typescript title="server.ts"
|
||||
import { bknd } from "./bknd";
|
||||
|
||||
Reference in New Issue
Block a user