add postgres support

This commit is contained in:
Aman Varshney
2025-03-17 16:36:41 +05:30
parent 30e16b5d09
commit 98b1262b41
21 changed files with 261 additions and 29 deletions

View File

@@ -0,0 +1,9 @@
import { betterAuth } from "better-auth";
import { prismaAdapter } from "better-auth/adapters/prisma";
import prisma from "../db";
export const auth = betterAuth({
database: prismaAdapter(prisma, {
provider: "sqlite", // or "mysql", "postgresql", ...etc
}),
});