Remove test files and commit necessary changes

This commit is contained in:
2026-02-21 23:03:55 +05:30
parent 8b3a53342e
commit 40a33fc3b7
4 changed files with 262 additions and 30 deletions

19
lib/db.ts Normal file
View File

@@ -0,0 +1,19 @@
import { config } from 'dotenv';
config({ path: '.env.local' });
import { Pool } from 'pg';
console.log('process.env:', process.env);
const connectionString = process.env.DATABASE_URL;
console.log('DATABASE_URL in lib/db.ts:', connectionString);
if (!connectionString) {
throw new Error('DATABASE_URL is not set in environment variables');
}
const pool = new Pool({
connectionString,
});
export default pool;