Dragon-Knight/public/index.php

22 lines
582 B
PHP

<?php
// index.php :: Primary program script, evil alien overlord, you decide.
// define our server path and bootstrap the request
const SERVER = '../server';
require_once SERVER.'/bootstrap/Boot.php';
// spin up our app container and the initial route
$app = new App(new Database(DB), new Request(), new Auth());
$route = App::$req->uri(0);
// redirect depending on installation status
installRedirect($route);
// route to the relevant module
$app->route('/', 'HomeModule')
->route('/install', 'InstallModule')
->route('/gate', 'GateModule')
->handle($route)
->cleanup();