Node.js
6
Вклад в тег
mysql = require('mysql');
// первое
dbConn1 = mysql.createConnection({
host: DB_HOST,
user: DB_USER,
password: DB_PASSWORD,
database: "database1"
});
dbConn1.connect ( function() {
console.log('connecting to db1');
})
// и второе
dbConn2 = mysql.createConnection({
host: DB_HOST,
user: DB_USER,
password: DB_PASSWORD,
database: "database2"
});
dbConn2.connect( function() {
console.log('connecting to db2');
})