variar para que funcione el mysql en pro
This commit is contained in:
parent
c5b0fa717a
commit
08b43c28d2
|
@ -11,7 +11,7 @@ async function connect() {
|
||||||
|
|
||||||
|
|
||||||
const mysql = require("mysql2/promise");
|
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;
|
global.connection = connection;
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue