Can´t conect Turso With Prisma in a T3Stack

60 Views Asked by At

I just want to connect my turso db into a t3 stack app with prisma

I was following all the docs process https://www.prisma.io/docs/orm/overview/databases/turso But im stuck in the latest part when i have to do this. Update your Prisma Client instance:

import { PrismaClient } from '@prisma/client'
import { PrismaLibSQL } from '@prisma/adapter-libsql'
import { createClient } from '@libsql/client'

const libsql = createClient({
  url: `${process.env.TURSO_DATABASE_URL}`,
  authToken: `${process.env.TURSO_AUTH_TOKEN}`,
})

const adapter = new PrismaLibSQL(libsql)
const prisma = new PrismaClient({ adapter })
0

There are 0 best solutions below