2018-03-10 01:45:24 +01:00
|
|
|
function MysqlConfig () {
|
|
|
|
this.database = 'default';
|
|
|
|
this.username = 'default';
|
|
|
|
this.password = 'default';
|
2018-03-13 03:26:03 +01:00
|
|
|
this.configure = (config) => {
|
|
|
|
if (!config) {
|
2018-03-13 03:33:09 +01:00
|
|
|
return console.log('No MySQL config received.');
|
2018-03-13 03:26:03 +01:00
|
|
|
}
|
|
|
|
const {database, username, password} = config;
|
|
|
|
this.database = database;
|
|
|
|
this.username = username;
|
|
|
|
this.password = password;
|
2018-03-10 01:45:24 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = new MysqlConfig();
|