community feature

This commit is contained in:
wass08
2026-02-11 15:23:18 +09:00
parent 4f9c4655e6
commit 2e8b663001
71 changed files with 1917 additions and 126 deletions
+17
View File
@@ -0,0 +1,17 @@
import { drizzle } from 'drizzle-orm/postgres-js'
import postgres from 'postgres'
import * as schema from './schema'
if (!process.env.POSTGRES_URL) {
throw new Error(
'Missing POSTGRES_URL environment variable. Add your Supabase database connection string.',
)
}
// Create postgres connection
const client = postgres(process.env.POSTGRES_URL)
// Create drizzle instance
export const db = drizzle(client, { schema })
export type Database = typeof db