← back to IWasCute

src/lib/db.ts

12 lines

import { Pool } from 'pg'

const pool = new Pool({
  connectionString: 'postgresql://dw_admin@127.0.0.1:5432/iwascute',
  max: 10,
})

export async function query(text: string, params?: unknown[]) {
  const result = await pool.query(text, params)
  return result
}