feat: setup drizzle
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user