Adds proper safety for prod and added option for SSL
This commit is contained in:
parent
0962b609c4
commit
d67c4063e4
6 changed files with 50 additions and 33 deletions
23
src/php/index.php
Normal file
23
src/php/index.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use GamesShop\ContainerHandler;
|
||||
use GamesShop\CrashHandler;
|
||||
use GamesShop\DoctrineManager;
|
||||
use GamesShop\Environment\EnvironmentHandler;
|
||||
use GamesShop\Routing\Router;
|
||||
use Laminas\HttpHandlerRunner\Emitter\SapiEmitter;
|
||||
use Whoops\Handler\HandlerInterface;
|
||||
use Whoops\Handler\PrettyPageHandler;
|
||||
use Whoops\Run;
|
||||
|
||||
require_once __DIR__ . '/../src/php/bootstrap.php';
|
||||
|
||||
ContainerHandler::get(CrashHandler::class)->register();
|
||||
|
||||
throw new Exception();
|
||||
|
||||
$router = ContainerHandler::getInstance()->get(Router::class);
|
||||
$result = $router->route();
|
||||
|
||||
(new SapiEmitter)->emit($result);
|
Loading…
Add table
Add a link
Reference in a new issue