index.php 846 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SSPanel-Uim Public Entrance File
  5. *
  6. * @license MIT(https://github.com/Anankke/SSPanel-Uim/blob/dev/LICENSE)
  7. * Addition: You shouldn't remove staff page or entrance of that page.
  8. */
  9. require __DIR__ . '/../vendor/autoload.php';
  10. require __DIR__ . '/../config/.config.php';
  11. require __DIR__ . '/../config/appprofile.php';
  12. require __DIR__ . '/../app/predefine.php';
  13. // TODO: legacy boot function
  14. use App\Services\Boot;
  15. Boot::setTime();
  16. Boot::bootDb();
  17. /** @var Slim\Container $container */
  18. $container = require __DIR__ . '/../app/container.php';
  19. $app = new Slim\App($container);
  20. /** @var closure $middleware */
  21. $middleware = require __DIR__ . '/../app/middleware.php';
  22. $middleware($app);
  23. /** @var closure $routes */
  24. $routes = require __DIR__ . '/../app/routes.php';
  25. $routes($app);
  26. $app->run();