mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-02 08:06:00 +00:00
f0d502133e
Introduced a Vite adapter with "fresh" and "cached" modes, centralized dev server configuration, and streamlined the example setup. Updated documentation with detailed steps for Vite integration and revised the internal dev environment to align with the changes.
18 lines
373 B
TypeScript
18 lines
373 B
TypeScript
import { serve } from "./src/adapter/vite";
|
|
|
|
const credentials = {
|
|
url: import.meta.env.VITE_DB_URL!,
|
|
authToken: import.meta.env.VITE_DB_TOKEN!
|
|
};
|
|
if (!credentials.url) {
|
|
throw new Error("Missing VITE_DB_URL env variable. Add it to .env file");
|
|
}
|
|
|
|
export default serve({
|
|
connection: {
|
|
type: "libsql",
|
|
config: credentials
|
|
},
|
|
forceDev: true
|
|
});
|