Merge branch 'db' into service
* db: 添加 Redis连接的类型声明 添加 Mysql连接的Port配置
This commit is contained in:
@@ -6,6 +6,7 @@ const config = {
|
||||
},
|
||||
mysql: {
|
||||
host: 'localhost',
|
||||
port: 3306,
|
||||
database: '',
|
||||
user: 'root',
|
||||
password: ''
|
||||
|
||||
@@ -27,6 +27,7 @@ class MySQLConnectPool {
|
||||
return mysql.createPool({
|
||||
host: config.mysql.host,
|
||||
database: config.mysql.database,
|
||||
port: config.mysql.port,
|
||||
user: config.mysql.user,
|
||||
password: config.mysql.password,
|
||||
waitForConnections: true,
|
||||
|
||||
@@ -41,4 +41,5 @@ class _RedisConnection {
|
||||
|
||||
const _redisConnection = new _RedisConnection();
|
||||
const RedisConnection = _redisConnection.getPool();
|
||||
export default RedisConnection;
|
||||
export default RedisConnection;
|
||||
export type { Redis };
|
||||
Reference in New Issue
Block a user