备份:修复前完整项目快照 2026-04-19

This commit is contained in:
root
2026-04-19 19:15:01 +08:00
parent 5266d7732b
commit d00f41a120
449 changed files with 89577 additions and 23251 deletions
+26
View File
@@ -0,0 +1,26 @@
const { Pool } = require('pg');
const pool = new Pool({
host: 'localhost',
port: 5432,
database: 'company_finance',
user: 'postgres',
password: 'X123c321@',
max: 20,
idleTimeoutMillis: 30000,
connectionTimeoutMillis: 2000,
});
pool.on('connect', () => {
console.log('✅ PostgreSQL 数据库连接成功');
});
pool.on('error', (err) => {
console.error('❌ PostgreSQL 连接错误:', err);
process.exit(-1);
});
module.exports = {
query: (text, params) => pool.query(text, params),
pool,
};