Open4

Prismaについて

まさぴょんまさぴょん

API エンドポイントの実装

1. Prisma Client の生成

npx prisma generateコマンドで、Prisma Client を生成します。

hono-prisma-supabase-template % npx prisma generate
Environment variables loaded from .env
Prisma schema loaded from src/vendors/prisma/schema.prisma

✔ Generated Prisma Client (v5.21.1) to ./node_modules/@prisma/client in 51ms

Start by importing your Prisma Client (See: http://pris.ly/d/importing-client)

Tip: Want real-time updates to your database without manual polling? Discover how with Pulse: https://pris.ly/tip-0-pulse

2. Prisma Client の設定