This commit is contained in:
hsueh chiahao
2025-10-26 10:29:56 +08:00
parent b72142fc44
commit f92417d5e3
13 changed files with 225 additions and 153 deletions

18
src/config/database.ts Normal file
View File

@@ -0,0 +1,18 @@
import { Pool } from 'pg';
export const pool = new Pool({
user: 'postgres',
host: 'localhost',
database: 'kintone_license_server',
password: 'psadmin',
port: 5432,
});
pool.on('connect', () => {
console.log('Connected to PostgreSQL database');
});
pool.on('error', (err) => {
console.error('Unexpected error on idle client', err);
process.exit(-1);
});