mirror of
https://github.com/cheveguerra/botLeiferAurik-Mod_2.0.git
synced 2026-04-17 19:36:17 +00:00
Commit inicial
This commit is contained in:
18
config/mysql.js
Normal file
18
config/mysql.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const mysql = require('mysql');
|
||||
const connection = mysql.createConnection({
|
||||
host : process.env.SQL_HOST || 'localhost',
|
||||
user : process.env.SQL_USER || 'root',
|
||||
password : process.env.SQL_PASS || '',
|
||||
database : process.env.SQL_DATABASE || 'pruebas'
|
||||
});
|
||||
|
||||
const connect = () => connection.connect(function(err) {
|
||||
if (err) {
|
||||
console.error('error connecting: ' + err.stack);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('Conexion correcta con tu base de datos MySQL')
|
||||
});
|
||||
|
||||
module.exports = {connect, connection}
|
||||
Reference in New Issue
Block a user