API-36: 🚑 Fixing critical issue with the amount of sql connections (!15)
Jenkins Production Deployment

Co-authored-by: Patrick Mueller <patrick@mueller-patrick.tech>
Reviewed-on: #15
Co-authored-by: Patrick Müller <patrick@plutodev.de>
Co-committed-by: Patrick Müller <patrick@plutodev.de>
This commit was merged in pull request #15.
This commit is contained in:
2022-01-08 15:42:09 +00:00
parent 88569f8a40
commit b4d5bdd0b6
22 changed files with 159 additions and 580 deletions
+19
View File
@@ -0,0 +1,19 @@
import * as dotenv from 'dotenv';
const mariadb = require('mariadb');
dotenv.config();
export namespace BetterzonDB {
const pool = mariadb.createPool({
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASSWORD,
database: process.env.BETTERZON_DATABASE,
connectionLimit: 5
});
export function getConnection() {
return pool;
}
}