cleand config file & more
This commit is contained in:
@@ -21,14 +21,19 @@ const mysqlCreds = {
|
||||
// host: '127.0.0.1',
|
||||
// port: 3306,
|
||||
socketPath: '/var/run/mysqld/mysqld.sock',
|
||||
user: 'p42',
|
||||
password: 'C3h=V9!r>Mvc>skxPf9?W2P3duJTk',
|
||||
user: process.env.user,
|
||||
password: process.env.mysql_pass,
|
||||
database: 'p42GUI',
|
||||
waitForConnections: true,
|
||||
connectionLimit: 10,
|
||||
queueLimit: 0
|
||||
}
|
||||
|
||||
if(!mysqlCreds.user || !mysqlCreds.password) {
|
||||
console.error('Missing MySQL credentials: set user and mysql_pass in environment')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const db = await mysql.createConnection(mysqlCreds)
|
||||
|
||||
const sessionStore = new MySQLStore({
|
||||
|
||||
Reference in New Issue
Block a user