mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-16 04:27:21 +00:00
updated App options "seed", changed examples to file db
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user