2022-01-01 14:14:57 -05:00
|
|
|
<?php
|
|
|
|
require __DIR__ . "/vendor/autoload.php";
|
2022-01-03 07:43:22 -05:00
|
|
|
use Steampixel\Route;
|
2022-01-01 14:14:57 -05:00
|
|
|
|
2022-01-03 07:43:22 -05:00
|
|
|
// LOAD DOTENV
|
|
|
|
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
|
|
|
|
$dotenv->load();
|
2022-01-01 14:14:57 -05:00
|
|
|
|
2022-01-03 10:11:24 -05:00
|
|
|
// -- HELPERS -- //
|
2022-01-03 08:18:16 -05:00
|
|
|
function getSubdir(): string {
|
2022-01-03 10:11:24 -05:00
|
|
|
return isset($_ENV['APP_SUBDIR']) && !empty($_ENV['APP_SUBDIR']) ? $_ENV['APP_SUBDIR'] : '';
|
2022-01-03 08:18:16 -05:00
|
|
|
}
|
|
|
|
|
2022-01-03 10:11:24 -05:00
|
|
|
require __DIR__ . '/routes/index.php';
|
2022-01-02 11:39:22 -05:00
|
|
|
|
2022-01-03 08:19:41 -05:00
|
|
|
Route::run(getSubdir());
|