I have been looking for a way to use mysql connection string to create a pool rather than using the credentials, this is so I can use the connection string from azure application settings, but so far could not find a solution.
I can create a pool this way:
pool = mysql.createPool({
connectionLimit: 20,
host: HOST,
user: USER,
password: PASSWORD,
database: DATABASE,
debug: false
});
But what I want to achieve is something like this:
pool = mysql.createPool(process.env.MYSQLCONNSTR_connectionstring);
I am using the module felixge/node-mysql.