Update skeleton for site/app refactoring

pull/55/head
Franz Liedke 2018-05-28 23:16:14 +02:00
parent a82b4f209f
commit fe3a0ac993
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4
2 changed files with 24 additions and 10 deletions

17
flarum
View File

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

View File

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