-
-
Save skyrpex/386316dc5004d4b12e17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var runner = require('child_process'); | |
runner.exec( | |
'php -r \'include("settings.php"); print json_encode($databases);\'', | |
function (err, stdout, stderr) { | |
var connection = JSON.parse(stdout).default.default; | |
console.log(connection.database); | |
// result botdb | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$databases['default']['default'] = array( | |
'driver' => 'mysql', | |
'database' => 'botdb', | |
'username' => 'botuser', | |
'password' => 'botpass', | |
'host' => 'localhost', | |
'prefix' => '', | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment