WestBocaExecutiveSuites / scripts /test-db-connection.ts
Demon1212122's picture
chore: reapply local updates
fb14972
raw
history blame contribute delete
563 Bytes
import { PrismaClient } from '@prisma/client';
async function testConnection() {
console.log('๐Ÿ”„ Testing database connection...');
try {
const prisma = new PrismaClient();
await prisma.$connect();
// Test query
const userCount = await prisma.user.count();
console.log(`โœ… Database connection successful! Found ${userCount} users.`);
await prisma.$disconnect();
} catch (error) {
console.error('โŒ Database connection failed:', error);
process.exit(1);
}
}
testConnection();