
Join the Conversation!
Subscribing gives you access to the comments so you can share your ideas, ask questions, and connect with others.
Before we can begin to write our first Prisma application, we need to install the Prisma CLI, dependencies and initialize a new Prisma project in our working directory.
Let's follow our setup guide to get started.
npm install prisma --save-dev
npm install @prisma/client
Then we can initialize a new Prisma project in our working directory.
npx prisma init
Setup a in Prisma and import the Direct and Database URLs from Supabase into our
Refer to This Lesson for Help
Use our Prisma schema to connect to Supabase by updating the datasource block in the schema.prisma file.
schema.prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
directUrl = env("DIRECT_URL")
}
The is what Prisma will use to connect to the database for queries like inserts, updates, and deletes. The is what Prisma will use to connect to the database when it needs to update the schema like adding or removing tables or rules.
We're all set up and ready to start writing our first Prisma application. In the next lesson, we'll discuss how to define our Prisma schema.
"Please login to view comments"
Subscribing gives you access to the comments so you can share your ideas, ask questions, and connect with others.