<?php
require __DIR__ . '/../vendor/autoload.php';

session_start();

// Instantiate the app
$settings = require __DIR__ . '/../app/settings.php';
$app = new \Slim\App($settings);

// Set up dependencies
require __DIR__ . '/../app/dependencies.php';

// Register middleware
// e.g: $app->add(new \Slim\Csrf\Guard);

// Register routes
require __DIR__ . '/../app/routes.php';

// Run!
$app->run();

<?php

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
    $file = __DIR__ . $_SERVER['REQUEST_URI'];
    if (is_file($file)) {
        return false;
    }
}

require __DIR__ . '/../vendor/autoload.php';

session_start();

// Instantiate the app
$settings = require __DIR__ . '/../app/settings.php';
$app = new \Slim\App($settings);

// Set up dependencies
require __DIR__ . '/../app/dependencies.php';

// Register middleware
// e.g: $app->add(new \Slim\Csrf\Guard);

// Register routes
require __DIR__ . '/../app/routes.php';

// Run!
$app->run();

Add support for PHP's built-in server
Add support for PHP's built-in server
