276a72b4ce
* Migrated manual tests to jest and started working on better coverage * Added a bookmarklet and push key generation tool allowing URL pushing from bookmarklets * Updated web scraping with tons of bug fixes * Updated attachments page to handle new push links * Aggressive note change checking, if patches get out of sync, server overwrites bad updates.
18 lines
497 B
JavaScript
18 lines
497 B
JavaScript
//Import mysql2 package
|
|
const mysql = require('mysql2');
|
|
const os = require('os') //Used to get path of home directory
|
|
const result = require('dotenv').config({ path:(os.homedir()+'/.env') })
|
|
|
|
// 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 |