Reputation: 53
I want to make requests for two databases using express and mysql modules and listen on port 8000.
Upvotes: 2
Views: 12279
Reputation: 229
You could create multiple db connections using mysql node package like:
var mysql = require('mysql');
var connection = mysql.createConnection({...});
var otherConnection = mysql.createConnection({...});
See node-mysql documentation
createConnection creates a new, separate database connection object on each call.
Upvotes: 2