added config stuff
This commit is contained in:
parent
776f4a8acf
commit
d582b4a77d
|
@ -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();
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue