mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-15 06:09:58 +08:00
41 lines
742 B
PHP
Executable File
41 lines
742 B
PHP
Executable File
<?php
|
|
/**
|
|
* Bootstrap file of Blessing Skin Server
|
|
*/
|
|
|
|
// Define Base Directory
|
|
define('BASE_DIR', __DIR__);
|
|
|
|
// Register Composer Auto Loader
|
|
require BASE_DIR.'/vendor/autoload.php';
|
|
|
|
// Load Aliases
|
|
App\Services\Boot::loadServices();
|
|
|
|
// Check Runtime Environment
|
|
Boot::checkRuntimeEnv();
|
|
|
|
// Load dotenv Configuration
|
|
Boot::loadDotEnv(BASE_DIR);
|
|
|
|
// Register Error Handler
|
|
Boot::registerErrorHandler();
|
|
|
|
$db_config = Config::getDbConfig();
|
|
|
|
// Boot Eloquent ORM
|
|
if (Config::checkDbConfig($db_config)) {
|
|
Boot::bootEloquent($db_config);
|
|
}
|
|
|
|
// Redirect to Setup Page
|
|
if (!Config::checkTableExist($db_config)) {
|
|
Http::redirect('../setup/index.php');
|
|
}
|
|
|
|
// Start Session
|
|
Boot::startSession();
|
|
|
|
// Start Route Dispatching
|
|
Boot::run();
|