mysql-client.js
428 Bytes
const knex = require('knex');
const config = global.yoho.config;
function init() {
return knex({
client: 'mysql',
connection: {
host: config.mysql.host,
port: config.mysql.port,
user: config.mysql.userName,
password: config.mysql.password,
database: config.mysql.db
},
pool: { min: 0, max: 10 }
});
}
module.exports = init();