RiLeX98
Explore posts from serversBABetter Auth
•Created by RiLeX98 on 4/13/2025 in #bug-reports
New Prisma generate and init
thanks bro. i solved it.
16 replies
BABetter Auth
•Created by RiLeX98 on 4/13/2025 in #bug-reports
New Prisma generate and init
how?
16 replies
BABetter Auth
•Created by RiLeX98 on 4/13/2025 in #bug-reports
New Prisma generate and init
generator client {
provider = "prisma-client-js"
output = "../app/generated/prisma"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
id Int @id @default(autoincrement())
email String @unique
name String?
}
16 replies
BABetter Auth
•Created by RiLeX98 on 4/13/2025 in #bug-reports
New Prisma generate and init
import { betterAuth } from "better-auth";
import { prismaAdapter } from "better-auth/adapters/prisma";
import { prisma } from "@/lib/prisma";
export const auth = betterAuth({
database: prismaAdapter(prisma, {
provider: "postgresql",
}),
emailAndPassword: {
enabled: true,
},
});
and this is my auth.ts16 replies
BABetter Auth
•Created by RiLeX98 on 4/13/2025 in #bug-reports
New Prisma generate and init
import { PrismaClient } from "@prisma/client";
const globalForPrisma = global as unknown as { prisma: PrismaClient };
export const prisma =
globalForPrisma.prisma || new PrismaClient();
if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
this is my /lib/prisma.ts16 replies