Premier commit
This commit is contained in:
22
web/index.php
Normal file
22
web/index.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
use Tracy\Debugger;
|
||||
use Piko\ModularApplication;
|
||||
|
||||
require(__DIR__ . '/../vendor/autoload.php');
|
||||
|
||||
foreach (require __DIR__ . '/../env.php' as $key => $val) {
|
||||
putenv("{$key}={$val}");
|
||||
}
|
||||
|
||||
if (getenv('APP_DEBUG')) {
|
||||
Debugger::enable(Debugger::DEVELOPMENT);
|
||||
}
|
||||
|
||||
$config = require __DIR__ . '/../config/app.php';
|
||||
|
||||
$app = new ModularApplication($config);
|
||||
|
||||
$app->pipe(new \app\lib\AuthMiddleware($app));
|
||||
$app->pipe(new \app\lib\CorsMiddleware());
|
||||
|
||||
$app->run();
|
||||
Reference in New Issue
Block a user