forked from syntaxbullet/aurorabot
chore: Enhance database debugging setup and expand test mocks for Drizzle queries and Discord API interactions.
This commit is contained in:
16
shared/scripts/debug-db.ts
Normal file
16
shared/scripts/debug-db.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
import postgres from "postgres";
|
||||
|
||||
const connectionString = "postgresql://auroradev:auroradev123@127.0.0.1:5432/aurora_test";
|
||||
console.log("Connecting to:", connectionString);
|
||||
|
||||
const sql = postgres(connectionString);
|
||||
|
||||
try {
|
||||
const result = await sql`SELECT 1 as val`;
|
||||
console.log("Success:", result);
|
||||
await sql.end();
|
||||
} catch (e) {
|
||||
console.error("Connection failed:", e);
|
||||
await sql.end();
|
||||
}
|
||||
Reference in New Issue
Block a user