Booting is now done by the Server classes

Refs flarum/core#1421.
pull/56/head
Franz Liedke 2018-09-21 23:35:34 +02:00
parent 54d9228ab8
commit 655aa9cea9
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4
2 changed files with 8 additions and 16 deletions

10
flarum
View File

@ -13,15 +13,11 @@ define('FLARUM_START', microtime(true));
require 'vendor/autoload.php'; require 'vendor/autoload.php';
$site = Flarum\Foundation\Site::fromPaths([ $server = new Flarum\Console\Server(
Flarum\Foundation\Site::fromPaths([
'base' => __DIR__, 'base' => __DIR__,
'public' => __DIR__.'/public', 'public' => __DIR__.'/public',
]); ])
$app = $site->bootApp();
$server = new Flarum\Console\Server(
$app->getConsoleCommands()
); );
$server->listen(); $server->listen();

View File

@ -11,15 +11,11 @@
require '../vendor/autoload.php'; require '../vendor/autoload.php';
$site = Flarum\Foundation\Site::fromPaths([ $server = new Flarum\Http\Server(
Flarum\Foundation\Site::fromPaths([
'base' => __DIR__.'/..', 'base' => __DIR__.'/..',
'public' => __DIR__, 'public' => __DIR__,
]); ])
$app = $site->bootApp();
$server = new Flarum\Http\Server(
$app->getRequestHandler()
); );
$server->listen(); $server->listen();