changed mysql connections
now using a pool of up to 10 connections instead of one
This commit is contained in:
parent
ab8c16dc82
commit
32c404cdd0
@ -23,17 +23,13 @@ const HASHES_DIFF = HASHES_DB - HASHES_COOKIE
|
|||||||
|
|
||||||
const DID_I_FINALLY_ADD_HTTPS = true
|
const DID_I_FINALLY_ADD_HTTPS = true
|
||||||
|
|
||||||
const con = mysql.createConnection({
|
const con = mysql.createPool({
|
||||||
|
connectionLimit : 10,
|
||||||
host: "localhost",
|
host: "localhost",
|
||||||
user: fs.readFileSync("mysql_user.txt").toString(),
|
user: fs.readFileSync("mysql_user.txt").toString(),
|
||||||
password: fs.readFileSync("mysql_key.txt").toString()
|
password: fs.readFileSync("mysql_key.txt").toString()
|
||||||
});
|
});
|
||||||
|
|
||||||
con.connect(function(err) {
|
|
||||||
if (err) throw err;
|
|
||||||
console.log("Connected!");
|
|
||||||
});
|
|
||||||
|
|
||||||
const dir = __dirname + "/"
|
const dir = __dirname + "/"
|
||||||
|
|
||||||
const cookiesecret = fs.readFileSync("cookiesecret.txt").toString()
|
const cookiesecret = fs.readFileSync("cookiesecret.txt").toString()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user