SolidScribe/server/config/database.js

16 lines
362 B
JavaScript
Raw Normal View History

//Import mysql2 package
const mysql = require('mysql2');
// Create the connection pool.
const pool = mysql.createPool({
host: process.env.DB_HOST,
user: process.env.DB_USER,
password: process.env.DB_PASS,
database: 'application',
waitForConnections: true,
connectionLimit: 20,
queueLimit: 0
});
//Export the pool for user elsewhere
module.exports = pool