SolidScribe/server/config/database.js
Max G 7c15427b3d * Added placeholder text to site when loading JS
* Added hidden text to site for scraping
* Login token will be destroyed if fetch site totals is called and the token is bad
* Moved passwords out of application and into a .env file that is loaded on startup
* Changed prod database password for primary user (which is dev)
* Set up .env for dev and prod
2020-04-13 07:44:57 +00:00

16 lines
362 B
JavaScript

//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