Applicatiebasis, incl. instructie
This commit is contained in:
@ -1,4 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Informatica Eindproject D4p
|
||||
* 6in3, Stedelijk Gymnasium Nijmegen
|
||||
* Docent: Hans de Wolf
|
||||
*
|
||||
* ==================
|
||||
*
|
||||
* Daniel Boutros,
|
||||
* Christiaan Goossens,
|
||||
* Jelmer Hinssen
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Check if the script is running in CLI mode
|
||||
*/
|
||||
if (PHP_SAPI == 'cli-server') {
|
||||
// To help the built-in PHP dev server, check if the request was actually for
|
||||
// something which should probably be served as a static file
|
||||
@ -9,22 +26,13 @@ if (PHP_SAPI == 'cli-server') {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Require the Composer autoloader to load dependencies
|
||||
*/
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
session_start();
|
||||
/**
|
||||
* Load the bootstrapping script
|
||||
*/
|
||||
|
||||
// Instantiate the app
|
||||
$settings = require __DIR__ . '/../src/settings.php';
|
||||
$app = new \Slim\App($settings);
|
||||
|
||||
// Set up dependencies
|
||||
require __DIR__ . '/../src/dependencies.php';
|
||||
|
||||
// Register middleware
|
||||
require __DIR__ . '/../src/middleware.php';
|
||||
|
||||
// Register routes
|
||||
require __DIR__ . '/../src/routes.php';
|
||||
|
||||
// Run app
|
||||
$app->run();
|
||||
include __DIR__ . '/../src/bootstrap.php';
|
||||
|
Reference in New Issue
Block a user