feat: setup drizzle

This commit is contained in:
konrad-enlaye
2025-12-03 11:11:07 -05:00
parent 4172af8b4f
commit 1e2148cdae
7 changed files with 1259 additions and 2 deletions

View File

@@ -1,6 +1,13 @@
import Image from "next/image";
export default function Home() {
import { db, users } from "@/db";
async function getUsers() {
return await db.select().from(users);
}
export default async function Home() {
const users = await getUsers();
return (
<div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black">
<main className="flex min-h-screen w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start">
@@ -50,6 +57,7 @@ export default function Home() {
/>
Deploy Now
</a>
<pre>{JSON.stringify(users, null, 2)}</pre>
<a
className="flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]"
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"