itap-cli-demo
Version:
> A lightweight, AI-powered npm package finder — directly from your terminal.
11 lines (10 loc) • 345 B
JavaScript
import { Client } from 'pg';
import { config } from 'dotenv';
import path from 'path';
import { fileURLToPath } from 'url';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
config({ path: path.resolve(__dirname, '../.env') });
const client = new Client({
connectionString: process.env.DATABASE_URL,
});
export default client;