My php config file looks like:
define('hostname_con1', 'localhost');
define('database_con1', 'mydatabase');
define('username_con1', 'user');
define('password_con1', 'password');
What would be the "smart" method to use that in my nodejs application to avoid to define database parameters again in my nodejs application ?
var client = mysql.createConnection({
host : 'localhost',
user : 'user',
password : 'password',
database : 'mydatabase',
charset: 'utf8',
insecureAuth: true,
});
I want to have 1 single config file for all (php and nodejs)
regards