spee.ch/config/mysqlConfig.js
2018-03-29 12:46:20 -07:00

20 lines
505 B
JavaScript

const logger = require('winston');
function mysql () {
this.database = 'default';
this.username = 'default';
this.password = 'default';
this.update = (config) => {
if (!config) {
return logger.warn('No MySQL config received.');
}
// configure credentials
logger.info('configuring mysql...');
const { database, username, password } = config;
this.database = database;
this.username = username;
this.password = password;
};
};
module.exports = new mysql();