import { Pool } from "pg"; import { Kysely, PostgresDialect } from "kysely"; import type Database from "./generated/Database"; export const pool = new Pool({ connectionString: "postgres://neondb_owner:npg_sOVmj8vWq2zG@ep-withered-king-adiz9gpi-pooler.c-2.us-east-1.aws.neon.tech:5432/neondb?sslmode=require&channel_binding=true", // channelBinding: require ? }); const dialect = new PostgresDialect({ pool, }); // Database interface is passed to Kysely's constructor, and from now on, Kysely // knows your database structure. // Dialect is passed to Kysely's constructor, and from now on, Kysely knows how // to communicate with your database. export const db = new Kysely({ dialect, });