feat: 切换为MariaDB数据库存储

This commit is contained in:
Cuishibing
2026-03-22 22:10:41 +08:00
parent a105f4aecb
commit fbd5f94a43
10 changed files with 346 additions and 299 deletions

14
lib/db.ts Normal file
View File

@@ -0,0 +1,14 @@
import mysql from 'mysql2/promise';
const pool = mysql.createPool({
host: '192.168.0.196',
port: 3306,
user: 'smalltown',
password: 'MyPassword1+',
database: 'smalltown',
waitForConnections: true,
connectionLimit: 10,
queueLimit: 0
});
export default pool;