From d779c97ced0f58a338706ee6335eb2a65f1cc4b1 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Wed, 5 Jul 2017 21:47:23 +0200 Subject: [PATCH] Use new Site class to bootstrap web server and console --- flarum | 8 +++++--- index.php | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/flarum b/flarum index fffdd15..ae12c33 100644 --- a/flarum +++ b/flarum @@ -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(); diff --git a/index.php b/index.php index edf98f0..c495ba2 100644 --- a/index.php +++ b/index.php @@ -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();