17 lines
371 B
PHP
17 lines
371 B
PHP
<?php
|
|
require __DIR__ . "/vendor/autoload.php";
|
|
use Steampixel\Route;
|
|
|
|
// LOAD DOTENV
|
|
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
|
|
$dotenv->load();
|
|
|
|
// -- HELPERS -- //
|
|
function getSubdir(): string {
|
|
return isset($_ENV['APP_SUBDIR']) && !empty($_ENV['APP_SUBDIR']) ? $_ENV['APP_SUBDIR'] : '';
|
|
}
|
|
|
|
require __DIR__ . '/routes/index.php';
|
|
|
|
Route::run(getSubdir());
|