spee.ch/config/mysqlConfig.js
2018-04-17 12:57:53 -07:00

20 lines
504 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();