refactor(server): 更新数据库连接配置
- 引入 gameDbConfig 替代 cdkDbConfig - 修改数据库连接池初始化,使用新的配置
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
const mysql = require('mysql');
|
const mysql = require('mysql');
|
||||||
const { cdkDbConfig } = require('../config/db.config');
|
const { cdkDbConfig,gameDbConfig } = require('../config/db.config');
|
||||||
|
|
||||||
// 创建连接池
|
// 创建连接池
|
||||||
const pool = mysql.createPool(cdkDbConfig);
|
const pool = mysql.createPool(gameDbConfig);
|
||||||
|
|
||||||
// 获取数据库连接
|
// 获取数据库连接
|
||||||
exports.getConnection = () => {
|
exports.getConnection = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user