2024-07-01 20:53:23 -05:00
|
|
|
<?php // index.php :: Primary program script, evil alien overlord, you decide.
|
|
|
|
|
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 18:17:51 -05:00
|
|
|
// check if the server has been installed
|
|
|
|
if (!installed()) redirect('/install');
|
|
|
|
|
|
|
|
// spin up our app container
|
|
|
|
$app = new App(DB);
|
|
|
|
|
|
|
|
// route the request
|
|
|
|
// routing follows a simple rule; the first segment of the URI is the
|
|
|
|
// module, and the module handles the rest
|
|
|
|
$route = App::$req->uri(0);
|
|
|
|
$routes = [
|
|
|
|
'home' => 'HomeModule::home',
|
|
|
|
];
|