forked from stg-tud/MUBench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
35 lines (23 loc) · 779 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
use Illuminate\Support\Facades\Schema;
session_start();
date_default_timezone_set('Europe/Berlin');
require __DIR__ . '/vendor/autoload.php';
$settings = require __DIR__ . '/settings.php';
$app = new \Slim\App($settings);
$container = $app->getContainer();
require __DIR__ . '/bootstrap/logger.php';
require __DIR__ . '/bootstrap/db.php';
$exp = new \MuBench\ReviewSite\Models\Experiment;
if(!Schema::hasTable($exp->getTable())){
if(file_exists(__DIR__ . '/setup/setup.php')){
header('Location: ./setup/setup.php');
exit;
}else{
die("Database not set up and setup script not found.");
}
}
require __DIR__ . '/bootstrap/auth.php';
require __DIR__ . '/bootstrap/renderer.php';
require __DIR__ . '/src/routes.php';
$app->run();