This example shows how to use Prisma ORM with Prisma Postgres.
Clone this repository and install dependencies:
npx try-prisma@latest --template databases/prisma-postgresThen navigate into the project directory and install dependencies:
cd prisma-postgres
bun installRun the following command to create a Prisma Postgres database:
npx create-db@latestCopy the DATABASE_URL from the output and add it to a .env file:
DATABASE_URL="postgresql://..."Tip: Claim your database at the provided URL to keep it permanently.
Push the schema to the database and generate Prisma Client:
npx prisma db push
npx prisma generatebun run dev