Compare commits

..

2 Commits

Author SHA1 Message Date
tracer 30b9b5da1d initial commit 2022-01-22 16:41:44 +01:00
tracer d582b4a77d added config stuff 2022-01-22 16:40:03 +01:00
2 changed files with 12 additions and 5 deletions

View File

@ -9,12 +9,12 @@ require dirname(__DIR__) . '/vendor/autoload.php';
use App\Controller\BindAPI; use App\Controller\BindAPI;
$arguments = [ // read config
'argc' => $argc, $configFile = __DIR__ ."/../config.json";
'argv' => $argv $configJSON = file_get_contents($configFile);
]; $config = json_decode($configJSON, associative: true);
$app = new BindAPI(...$arguments); $app = new BindAPI(config: $config, argc: $argc, argv: $argv);
$app->runCommand(); $app->runCommand();

View File

@ -0,0 +1,7 @@
{
"dbHost": "localhost",
"dbPort": 3306,
"dbDatabase": "sampledb",
"dbUser": "sampleuser",
"dbPassword": "secret"
}