Dragon-Knight/public/index.php

22 lines
577 B
PHP
Raw Normal View History

<?php
// index.php :: Primary program script, evil alien overlord, you decide.
2024-07-01 20:53:23 -05:00
2024-07-11 18:17:51 -05:00
// define our server path and bootstrap the request
2024-07-02 10:33:14 -05:00
const SERVER = '../server';
require_once SERVER.'/bootstrap.php';
2024-07-01 20:53:23 -05:00
2024-07-11 20:47:39 -05:00
// spin up our app container and the initial route
$app = new App(new Database(DB), new Request(), new Auth());
2024-07-11 18:17:51 -05:00
$route = App::$req->uri(0);
2024-07-11 20:47:39 -05:00
// redirect depending on installation status
installRedirect($route);
// route to the relevant module
$app->route('/', 'HomeModule')
->route('/install', 'InstallModule')
->route('/gate', 'GateModule')
->handle($route)
->cleanup();