"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.dbConnection=void 0;var _process$env$NODE_ENV,_mysql=_interopRequireDefault(require("mysql2"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}var env=null!==(_process$env$NODE_ENV=process.env.NODE_ENV)&&void 0!==_process$env$NODE_ENV?_process$env$NODE_ENV:"testing",config=require("./config")[env],userConnection=_mysql["default"].createPool({host:config.database.host,user:config.database.user,password:config.database.password,port:config.database.port,database:config.database.dbUser,waitForConnections:!0,connectionLimit:10,queueLimit:0});userConnection.query("USE "+config.database.dbUser);// ==== PROJECT DB CONNECTION ====
var projectConnection=_mysql["default"].createPool({host:config.database.host_project,user:config.database.user,password:config.database.password,port:config.database.port,database:config.database.dbProject,waitForConnections:!0,connectionLimit:10,queueLimit:0});projectConnection.query("USE "+config.database.dbProject);var dbConnection={user:userConnection,project:projectConnection};exports.dbConnection=dbConnection;