Do I need to create multiple instances of Sequelize if I want to use two databases? That is, two databases on the same machine.
If not, what\'s the proper way to do
Why don't you use raw query? With this you can connect to one database and query the other. See sample code below.
const sequelize = require('db_config');
function test(req, res){
const qry = `SELECT * FROM db1.affiliates_order co
LEFT JOIN db2.affiliates m ON m.id = co.campaign_id`;
sequelize.query(qry, null, { raw: true}).then(result=>{
console.log(result);
})
}