Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Prisma Postgres

This example shows how to use Prisma ORM with Prisma Postgres.

Getting Started

1. Download the example & install dependencies

Clone this repository and install dependencies:

npx try-prisma@latest --template databases/prisma-postgres

Then navigate into the project directory and install dependencies:

cd prisma-postgres
bun install

2. Create a Prisma Postgres database

Run the following command to create a Prisma Postgres database:

npx create-db@latest

Copy 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.

3. Push the schema & generate Prisma Client

Push the schema to the database and generate Prisma Client:

npx prisma db push
npx prisma generate

4. Run the example

bun run dev

Next steps