mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-15 20:17:22 +00:00
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
|
|
});
|