J
Size: a a a
J
CM
CM
CM
J
J
D
class DataBase {
constructor (host, user, pass, base) {
this.host = host;
this.user = user;
this.pass = pass;
this.base = base;
this.dbConnect();
}
async dbConnect () {
this.connection = await new mysql.createConnection({
host: this.host,
user: this.user,
password: this.pass,
database: this.base
});
await this.connection.connect()
.then(function (value) {
logger.info('Bot connected to the DataBase!');
}, function (reason) {
logger.error('Bot don\'t connected to the DataBase');
logger.error(reason);
});
}
}
D
D
CM
J
CM
CM
ГЩ
class DataBase {
constructor (host, user, pass, base) {
this.host = host;
this.user = user;
this.pass = pass;
this.base = base;
this.dbConnect();
}
async dbConnect () {
this.connection = await new mysql.createConnection({
host: this.host,
user: this.user,
password: this.pass,
database: this.base
});
await this.connection.connect()
.then(function (value) {
logger.info('Bot connected to the DataBase!');
}, function (reason) {
logger.error('Bot don\'t connected to the DataBase');
logger.error(reason);
});
}
}
J
D
ГЩ
let value = await this.connection.connect()
CM
J
J