Use new Site class to bootstrap web server and console

next-back
Franz Liedke 2017-07-05 21:47:23 +02:00
parent 18c1750f3a
commit d779c97ced
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4
2 changed files with 10 additions and 6 deletions

8
flarum
View File

@ -13,6 +13,8 @@ define('FLARUM_START', microtime(true));
require 'vendor/autoload.php';
$server = new Flarum\Console\Server(__DIR__);
$server->listen();
Flarum\Console\Server::fromSite(
(new Flarum\Foundation\Site)
->setBasePath(__DIR__)
->setPublicPath(__DIR__)
)->listen();

View File

@ -11,6 +11,8 @@
require 'vendor/autoload.php';
$server = new Flarum\Http\Server(__DIR__);
$server->listen();
Flarum\Http\Server::fromSite(
(new Flarum\Foundation\Site)
->setBasePath(__DIR__)
->setPublicPath(__DIR__)
)->listen();