2019-07-19 13:51:57 -07:00
|
|
|
//Import mysql2 package
|
|
|
|
const mysql = require('mysql2');
|
|
|
|
|
|
|
|
// Create the connection pool.
|
|
|
|
const pool = mysql.createPool({
|
2020-04-13 00:44:57 -07:00
|
|
|
host: process.env.DB_HOST,
|
|
|
|
user: process.env.DB_USER,
|
|
|
|
password: process.env.DB_PASS,
|
2019-07-19 13:51:57 -07:00
|
|
|
database: 'application',
|
|
|
|
waitForConnections: true,
|
|
|
|
connectionLimit: 20,
|
|
|
|
queueLimit: 0
|
|
|
|
});
|
|
|
|
|
|
|
|
//Export the pool for user elsewhere
|
|
|
|
module.exports = pool
|