mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 12:37:20 +00:00
update docs on new cli starters
This commit is contained in:
@@ -4,9 +4,24 @@ description: 'Run bknd inside Node'
|
||||
---
|
||||
import InstallBknd from '/snippets/install-bknd.mdx';
|
||||
|
||||
|
||||
## Installation
|
||||
Install bknd as a dependency:
|
||||
<InstallBknd />
|
||||
To get started with Node and bknd you can either install the package manually, and follow the descriptions below, or use the CLI starter:
|
||||
|
||||
<Tabs>
|
||||
<Tab title="CLI Starter">
|
||||
Create a new Node CLI starter project by running the following command:
|
||||
|
||||
```sh
|
||||
npx bknd create -i node
|
||||
```
|
||||
</Tab>
|
||||
<Tab title="Manual">
|
||||
Create a new Node project and then install bknd as a dependency:
|
||||
|
||||
<InstallBknd />
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Serve the API & static files
|
||||
The `serve` function of the Node adapter makes sure to also serve the static files required for
|
||||
@@ -20,7 +35,7 @@ import { serve } from "bknd/adapter/node";
|
||||
/** @type {import("bknd/adapter/node").NodeAdapterOptions} */
|
||||
const config = {
|
||||
connection: {
|
||||
url: ":memory:"
|
||||
url: "file:data.db"
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user