variar para que funcione el mysql en pro

This commit is contained in:
Jaume Solís 2024-04-04 17:26:18 +02:00
parent c5b0fa717a
commit 08b43c28d2
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ async function connect() {
const mysql = require("mysql2/promise");
const connection = await mysql.createConnection("mysql://" + user + ":" + password + "@" + host + ":" + port + "/" + database + "");
const connection = await mysql.createConnection({host: host,port: port,user: user,password: password,database: database});
global.connection = connection;
return connection;
}