updated App options "seed", changed examples to file db

This commit is contained in:
dswbx
2025-02-18 20:01:08 +01:00
parent a4e46a2768
commit a01b99be27
8 changed files with 38 additions and 29 deletions

View File

@@ -27,7 +27,7 @@ declare module "bknd/core" {
export const ALL = serve<APIContext>({
// we can use any libsql config, and if omitted, uses in-memory
connection: {
url: "file:test.db"
url: "file:data.db"
},
// an initial config is only applied if the database is empty
initialConfig: {

View File

@@ -7,7 +7,7 @@ import { type BunBkndConfig, serve } from "bknd/adapter/bun";
// this is optional, if omitted, it uses an in-memory database
const config: BunBkndConfig = {
connection: {
url: ":memory:"
url: "file:data.db"
}
};

View File

@@ -7,7 +7,7 @@ import { serve } from "bknd/adapter/node";
/** @type {import("bknd/adapter/node").NodeBkndConfig} */
const config = {
connection: {
url: ":memory:"
url: "file:data.db"
}
};

View File

@@ -1,6 +1,5 @@
import { type MetaFunction, useLoaderData } from "@remix-run/react";
import type { LoaderFunctionArgs } from "@remix-run/server-runtime";
import { useAuth } from "bknd/client";
export const meta: MetaFunction = () => {
return [{ title: "Remix & bknd" }, { name: "description", content: "Welcome to Remix & bknd!" }];
@@ -13,8 +12,6 @@ export const loader = async ({ context: { api } }: LoaderFunctionArgs) => {
export default function Index() {
const { data, user } = useLoaderData<typeof loader>();
const auth = useAuth();
console.log("auth", auth);
return (
<div>