mirror of
https://github.com/yusufipk/RepoHub.git
synced 2026-09-11 10:36:07 +00:00
feat: add PostgreSQL database support and development scripts
- 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
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/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();
|
||||
Reference in New Issue
Block a user