Prisma in next.js project setups

  npm i -D prisma @prisma/client

npx prisma init

npx prisma generate 

npx prisma migrate dev --name init => create migrations and  tables

npx prisma studio


npx tsx ./db/seed (seed.ts) (must import'dotenv/config' so .env file can be seen)

Comments

Popular posts from this blog

new Promise((resolve) => setTimeout(resolve, ms))

min-h-screen in Tailwind CSS

Ecommerce with JS