pseudosubs-v1/srv/mysql.ts

17 lines
499 B
TypeScript
Raw Normal View History

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;