Files
personal-website/scripts/print-db-server-version.ts
Stan Runge c2bc9050c2
Some checks failed
Test and deploy staging / staging (push) Failing after 2m50s
feat: build compact BO2 grind companion with cumulative ranks
2026-10-08 21:06:19 +00:00

11 lines
318 B
TypeScript

import postgres from 'postgres';
if (!process.env.DB_URL) throw new Error('DB_URL is required');
const client = postgres(process.env.DB_URL, { max: 1 });
try {
const [row] = await client`select current_setting('server_version_num')::integer as version`;
console.log(row.version);
} finally {
await client.end();
}