This is a Next.js project bootstrapped with create-next-app
.
First, create an .env
file in the root directory and add the following environment variables:
POSTGRES_PRISMA_URL="postgresql://YOUR_POSTGRES_URL"
POSTGRES_URL_NON_POOLING="postgresql://YOUR_POSTGRES_URL"
Replace YOUR_POSTGRES_URL
with the connection URL for your PostgreSQL database.
Next, run the Prisma migration to create the required database tables:
npx prisma migrate dev
Then, generate the Prisma client:
npx prisma generate
Finally, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.