changed mysql connections

now using a pool of up to 10 connections instead of one
This commit is contained in:
Mystikfluu 2022-04-27 15:46:40 +02:00
parent ab8c16dc82
commit 32c404cdd0

View File

@ -23,17 +23,13 @@ const HASHES_DIFF = HASHES_DB - HASHES_COOKIE
const DID_I_FINALLY_ADD_HTTPS = true
const con = mysql.createConnection({
const con = mysql.createPool({
connectionLimit : 10,
host: "localhost",
user: fs.readFileSync("mysql_user.txt").toString(),
password: fs.readFileSync("mysql_key.txt").toString()
});
con.connect(function(err) {
if (err) throw err;
console.log("Connected!");
});
const dir = __dirname + "/"
const cookiesecret = fs.readFileSync("cookiesecret.txt").toString()