mirror of
https://github.com/yusufipk/RepoHub.git
synced 2026-09-11 18:46:07 +00:00
- Added pg and @types/pg dependencies for PostgreSQL integration - Created database testing and backend initialization scripts - Changed dev server port to 3002 to avoid conflicts
26 lines
617 B
JavaScript
26 lines
617 B
JavaScript
#!/usr/bin/env node
|
|
|
|
// Database connection test script
|
|
const { testConnection } = require('../src/lib/database/config');
|
|
|
|
async function testDatabaseConnection() {
|
|
console.log('🔗 Testing database connection...');
|
|
|
|
try {
|
|
const success = await testConnection();
|
|
|
|
if (success) {
|
|
console.log('✅ Database connection successful!');
|
|
process.exit(0);
|
|
} else {
|
|
console.log('❌ Database connection failed!');
|
|
process.exit(1);
|
|
}
|
|
} catch (error) {
|
|
console.error('❌ Database connection error:', error.message);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
testDatabaseConnection();
|