17 lines
499 B
TypeScript
17 lines
499 B
TypeScript
const obtenerConexionMySql = () => {
|
|
|
|
const mysql = require('mysql');
|
|
const SQL_CONNECT_DATA:object = {
|
|
// Solo para produccion habilitar socketPath
|
|
// socketPath: '/cloudsql/pseudosubs:us-central1:base-principal',
|
|
user: 'root',
|
|
password: 'GgwTo5GryvDhAr06wk5opKhd',
|
|
database: 'animes_links',
|
|
multipleStatements: true
|
|
};
|
|
|
|
return mysql.createConnection(SQL_CONNECT_DATA);
|
|
|
|
};
|
|
|
|
module.exports.obtenerConexionMySql = obtenerConexionMySql; |