Browse Source

add multi-host config support

main
ghost 7 months ago
parent
commit
cf4496bc55
  1. 6
      .gitignore
  2. 0
      config/example.json
  3. 7
      src/server.php

6
.gitignore vendored

@ -1,3 +1,5 @@
/vendor/ /vendor/
/composer.lock /config/*
/config.json !/config/example.json
/composer.lock

0
example/config.json → config/example.json

7
src/server.php

@ -11,9 +11,12 @@ $config = json_decode(
file_get_contents( file_get_contents(
__DIR__ . __DIR__ .
DIRECTORY_SEPARATOR . '..'. DIRECTORY_SEPARATOR . '..'.
DIRECTORY_SEPARATOR . 'config.json' DIRECTORY_SEPARATOR . 'config'.
DIRECTORY_SEPARATOR . (
isset($argv[1]) ? $argv[1] : 'example.json'
)
) )
); ); if (!$config) exit;
// Init session // Init session
$session = []; $session = [];

Loading…
Cancel
Save