wolf/gang
wolf/gang
DTDrizzle Team
Created by wolf/gang on 10/8/2024 in #help
How to connect to local sqlite database
Thank you! I just got it running with the synchronous method like described in the docs:
// page.tsx
import { drizzle } from "drizzle-orm/libsql";
import { createClient } from "@libsql/client";

const getData = async () => {
const client = createClient({ url: "file:local.db" });
const db = drizzle(client);
};

export default async function Home() {
return <div>Hello</div>;
}
// page.tsx
import { drizzle } from "drizzle-orm/libsql";
import { createClient } from "@libsql/client";

const getData = async () => {
const client = createClient({ url: "file:local.db" });
const db = drizzle(client);
};

export default async function Home() {
return <div>Hello</div>;
}
4 replies